Spaces:
Running
Running
Delete asyncreq_util.py
Browse files- asyncreq_util.py +0 -13
asyncreq_util.py
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
import aiohttp
|
2 |
-
|
3 |
-
async def async_post(url, data, headers):
|
4 |
-
async with aiohttp.ClientSession() as session:
|
5 |
-
async with session.post(url, data=data, headers=headers) as response:
|
6 |
-
response.raise_for_status() # Raise an exception for non-2xx status codes
|
7 |
-
return response
|
8 |
-
|
9 |
-
async def async_get(url, data, headers):
|
10 |
-
async with aiohttp.ClientSession() as session:
|
11 |
-
async with session.get(url) as response:
|
12 |
-
response.raise_for_status() # Raise an exception for non-2xx status codes
|
13 |
-
return response
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|