We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When downloading the flags in
async def get_flag(client: AsyncClient, cc: str) -> bytes: 4 url = f'{BASE_URL}/{cc}/{cc}.gif'.lower() resp = await client.get(url, timeout=6.1, follow_redirects=True) 5 return resp.read() 6
it seems that we read the response using .read() which is synchronous, why don't we
return await resp.aread()
instead?
The explanation seems to be for client.get() where it is doing network IO asynchrnously provided by httpx. But not for read()
6 Network I/O operations are implemented as coroutine methods, so they are driven asynchronously by the asyncio event loop.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When downloading the flags in
it seems that we read the response using .read() which is synchronous, why don't we
instead?
The explanation seems to be for client.get() where it is doing network IO asynchrnously provided by httpx. But not for read()
The text was updated successfully, but these errors were encountered: