2014-10-18 12:19:27 +00:00
|
|
|
#
|
|
|
|
# uaiohttpclient - fetch URL passed as command line argument.
|
|
|
|
#
|
2023-11-07 22:16:05 +00:00
|
|
|
import sys
|
2024-06-12 03:44:20 +00:00
|
|
|
import asyncio
|
2014-10-18 12:19:27 +00:00
|
|
|
import uaiohttpclient as aiohttp
|
|
|
|
|
|
|
|
|
2023-11-07 22:16:05 +00:00
|
|
|
async def run(url):
|
|
|
|
resp = await aiohttp.request("GET", url)
|
2014-10-18 12:19:27 +00:00
|
|
|
print(resp)
|
2023-11-07 22:16:05 +00:00
|
|
|
print(await resp.read())
|
2014-10-18 12:19:27 +00:00
|
|
|
|
2021-05-27 05:50:04 +00:00
|
|
|
|
2014-10-18 12:19:27 +00:00
|
|
|
url = sys.argv[1]
|
2023-11-07 22:16:05 +00:00
|
|
|
asyncio.run(run(url))
|