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",
|
content_type: str = "application/json",
|
||||||
endpoint: str = "/_matrix/client/r0",
|
endpoint: str = "/_matrix/client/r0",
|
||||||
) -> dict:
|
) -> dict:
|
||||||
params["access_token"] = self.as_token
|
headers = {
|
||||||
headers = {"Content-Type": content_type}
|
"Authorization": f"Bearer {self.as_token}",
|
||||||
|
"Content-Type": content_type,
|
||||||
|
}
|
||||||
payload = json.dumps(content) if isinstance(content, dict) else content
|
payload = json.dumps(content) if isinstance(content, dict) else content
|
||||||
endpoint = (
|
endpoint = (
|
||||||
f"{self.base_url}{endpoint}{path}?"
|
f"{self.base_url}{endpoint}{path}?"
|
||||||
|
|
Loading…
Reference in a new issue