Answer the question
In order to leave comments, you need to log in
How to send post request(s) many and different?
async def fetch(url, session):
async with session.post(url,data=params) as response:
return await response.read()
async def run(r):
url = 'http://www.temp-mail.ru'
tasks = []
async with ClientSession() as session:
for i in range(r):
task = asyncio.ensure_future(fetch(url.format(i), session))
tasks.append(task)
responses = await asyncio.gather(*tasks)
print(responses)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question