Skip to content

Instantly share code, notes, and snippets.

@ycd
Last active May 3, 2022 11:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ycd/725017df88bb3d9378e76d06d83738f4 to your computer and use it in GitHub Desktop.
Save ycd/725017df88bb3d9378e76d06d83738f4 to your computer and use it in GitHub Desktop.
def send_100_requests():
URL = "http://httpbin.org/uuid"
result = []
async def send_request():
r = requests.get(URL)
result.append(r.text)
async def main():
await asyncio.gather(*[send_request() for _ in range(100)])
asyncio.run(main())
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment