Skip to content
Discussion options

You must be logged in to vote

Ah, from the docs: https://www.python-httpx.org/async/

Streaming requests
When sending a streaming request body with an AsyncClient instance, you should use an async bytes generator instead of a bytes generator:

async def upload_bytes():
    ...  # yield byte content

await client.post(url, content=upload_bytes())

Replies: 5 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by lee-cq
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants