Make sending Matrix requests easier

This commit is contained in:
2025-10-17 17:44:41 -04:00
parent 6dd4fb04e3
commit 9ca4c913f3
5 changed files with 99 additions and 40 deletions

View File

@@ -132,11 +132,9 @@ async def client():
def federation_self_test():
try:
auth = globals.make_auth_header(config.server_name, "GET", "/.well-known/matrix/server")
resp = globals.http_client.get(
f"https://{config.server_name}/.well-known/matrix/server",
headers={"Authorization": auth}
resp = globals.http_client().get(
path="/",
destination=config.server_name,
)
resp.raise_for_status()