diff --git a/access_token_service/ats.py b/access_token_service/ats.py index 278f733fa6145e1a5052e06154c3fa4fb909521f..9683a8d6dc0d328b61f3a96a181d6b5ce2e99262 100644 --- a/access_token_service/ats.py +++ b/access_token_service/ats.py @@ -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):