send auth token in headers
This commit is contained in:
parent
17ad06c503
commit
8607a402fa
1 changed files with 4 additions and 2 deletions
|
@ -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}?"
|
||||
|
|
Loading…
Reference in a new issue