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

AsyncHTTPClient is not context manager.

parent 3025bb93
No related branches found
No related tags found
No related merge requests found
...@@ -15,9 +15,9 @@ class AccessTokenHandler(HubAuthenticated, RequestHandler): ...@@ -15,9 +15,9 @@ class AccessTokenHandler(HubAuthenticated, RequestHandler):
headers = { headers = {
'Authorization': f'token {self.hub_auth.api_token}', 'Authorization': f'token {self.hub_auth.api_token}',
} }
with AsyncHTTPClient as client: client = AsyncHTTPClient()
async with client.get(user_endpoint, headers=headers) as resp: async with client.get(user_endpoint, headers=headers) as resp:
return json.loads(resp) return json.loads(resp)
@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