Tweak HTTPsig

This commit is contained in:
Thomas Sileo 2022-07-14 19:43:02 +02:00
parent 61c3c3e214
commit 426669d870
2 changed files with 9 additions and 3 deletions

View file

@ -107,7 +107,11 @@ class NotAnObjectError(Exception):
self.resp = resp
async def fetch(url: str, params: dict[str, Any] | None = None) -> RawObject:
async def fetch(
url: str,
params: dict[str, Any] | None = None,
disable_httpsig: bool = False,
) -> RawObject:
async with httpx.AsyncClient() as client:
resp = await client.get(
url,
@ -117,7 +121,7 @@ async def fetch(url: str, params: dict[str, Any] | None = None) -> RawObject:
},
params=params,
follow_redirects=True,
auth=auth,
auth=None if disable_httpsig else auth,
)
# Special handling for deleted object