Last active
May 3, 2022 11:03
-
-
Save ycd/725017df88bb3d9378e76d06d83738f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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