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):
'Authorization': f'token {self.hub_auth.api_token}',
}
client = AsyncHTTPClient()
async with client.get(user_endpoint, headers=headers) as resp:
return json.loads(resp)
resp = await client.fetch(user_endpoint, headers=headers)
return json.loads(resp.body)
@authenticated
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