Fix fetcher's send_json to make post a request and get a response.
This commit is contained in:
@@ -30,8 +30,8 @@ class ApiFetcher:
|
|||||||
"""
|
"""
|
||||||
url = f"{self.__base_url}{endpoint}"
|
url = f"{self.__base_url}{endpoint}"
|
||||||
|
|
||||||
async with self.__session.get(url) as session:
|
async with self.__session as session:
|
||||||
await session.post(url, json=context)
|
async with session.post(url, json=context) as response:
|
||||||
json_data = await session.json()
|
json_data = await response.json()
|
||||||
return (session.status, json_data)
|
return (response.status, json_data)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user