Skip to content
Snippets Groups Projects
Commit 0faa4740 authored by Jonathan Villemaire-Krajden's avatar Jonathan Villemaire-Krajden
Browse files

AsyncHTTPClient use fetch.

parent 831f2e92
No related branches found
No related tags found
No related merge requests found
...@@ -16,8 +16,8 @@ class AccessTokenHandler(HubAuthenticated, RequestHandler): ...@@ -16,8 +16,8 @@ class AccessTokenHandler(HubAuthenticated, RequestHandler):
'Authorization': f'token {self.hub_auth.api_token}', 'Authorization': f'token {self.hub_auth.api_token}',
} }
client = AsyncHTTPClient() client = AsyncHTTPClient()
async with client.get(user_endpoint, headers=headers) as resp: resp = await client.fetch(user_endpoint, headers=headers)
return json.loads(resp) return json.loads(resp.body)
@authenticated @authenticated
async def get(self): async def get(self):
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment