Skip to content

Non-destructive request header access #467

Answered by davidpdrsn
kellytk asked this question in Q&A
Discussion options

You must be logged in to vote

The design of extractors doesn't allow for this unfortunately. Extractors that consume the request body have the same problems, such as String, Bytes, and Json. So even if we made HeaderMap clone all the headers (which I don't think we should) body extractors would still have the issue.

I recommend you write own HeaderMapClone extractor that clones the headers and leaves the original ones in place for other extractors.

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@davidpdrsn
Comment options

@kellytk
Comment options

@davidpdrsn
Comment options

@kellytk
Comment options

@davidpdrsn
Comment options

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