send auth token in headers

This commit is contained in:
git-bruh 2021-08-04 17:32:08 +05:30
parent 17ad06c503
commit 8607a402fa
No known key found for this signature in database
GPG key ID: E1475C50075ADCE6

View file

@ -188,8 +188,10 @@ class AppService(bottle.Bottle):
content_type: str = "application/json",
endpoint: str = "/_matrix/client/r0",
) -> dict:
params["access_token"] = self.as_token
headers = {"Content-Type": content_type}
headers = {
"Authorization": f"Bearer {self.as_token}",
"Content-Type": content_type,
}
payload = json.dumps(content) if isinstance(content, dict) else content
endpoint = (
f"{self.base_url}{endpoint}{path}?"