Skip to content

Extract web::Json from application middleware proves problematic #3436

Answered by robjtede
Ducolnd asked this question in Q&A
Discussion options

You must be logged in to vote

Extractors that consume the request body can only do so once, or else we'd be potentially needing to buffer huge payloads in-memory.

One of the examples shows a solution to this, which is to put a body back into the request after consuming it, allowing inner middleware and handlers to consume it again.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ducolnd
Comment options

Answer selected by Ducolnd
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