99from ._auth_provider import get_auth_provider
1010from .config import APP_REGISTRATION , TENANT_ID , AUTHORITY_HOST_URI
1111
12- from ._decorators import raise_for_status , http_retry
12+ from ._decorators import raise_for_status , http_retry , raise_for_status_async
1313
1414logger = logging .getLogger ("sumo.wrapper" )
1515
@@ -328,7 +328,7 @@ def getLogger(self, name):
328328 logger .addHandler (handler )
329329 return logger
330330
331- @raise_for_status
331+ @raise_for_status_async
332332 @http_retry
333333 async def get_async (self , path : str , params : dict = None ):
334334 """Performs an async GET-request to the Sumo API.
@@ -364,7 +364,7 @@ async def get_async(self, path: str, params: dict = None):
364364 "authorization" : f"Bearer { token } " ,
365365 }
366366
367- async with httpx .AsyncClient () as client :
367+ async with httpx .AsyncClient (follow_redirects = True ) as client :
368368 response = await client .get (
369369 f"{ self .base_url } { path } " ,
370370 params = params ,
@@ -374,7 +374,7 @@ async def get_async(self, path: str, params: dict = None):
374374
375375 return response
376376
377- @raise_for_status
377+ @raise_for_status_async
378378 @http_retry
379379 async def post_async (
380380 self ,
@@ -450,7 +450,7 @@ async def post_async(
450450
451451 return response
452452
453- @raise_for_status
453+ @raise_for_status_async
454454 @http_retry
455455 async def put_async (
456456 self , path : str , blob : bytes = None , json : dict = None
@@ -496,7 +496,7 @@ async def put_async(
496496
497497 return response
498498
499- @raise_for_status
499+ @raise_for_status_async
500500 @http_retry
501501 async def delete_async (self , path : str , params : dict = None ) -> dict :
502502 """Performs an async DELETE-request to the Sumo API.
0 commit comments