Skip to content

Instantly share code, notes, and snippets.

@nalaekaw
Created September 16, 2022 05:39
Show Gist options
  • Save nalaekaw/c8ecc6b80aa1908b95020124753baddf to your computer and use it in GitHub Desktop.
Save nalaekaw/c8ecc6b80aa1908b95020124753baddf to your computer and use it in GitHub Desktop.
import asyncio
import aiohttp
url = ''
async def get_response(url):
async with aiohttp.ClientSession() as session:
async with session.get(url) as response:
# filename = response.content_disposition.filename
print(response)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loop.run_until_complete(get_response(url))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment