Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

Situation: client POST'ing using chunked transfer encoding. with either uvicorn/hypercorn frontend with a Quart ASGI app.

When I use await request.get_json() it always returns None but await request.data will work and
get the full payload. I can't control the client ATM.

Is this the expected behaviour?

I'm actually ok with json.loads(...request.data...) but curious about the difference in behaviour - if it matters the payload is normally very small and completed in the first chunk.

You must be logged in to vote

Replies: 1 comment

Comment options

The most likely possibility to me is that the client does not set the JSON mimetype. What happens if you do request.get_json(force=true)?

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
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.