Skip to content

How to print all request headers? #2880

Answered by provinzkraut
elliotwaite asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @elliotwaite, unfortunately, you've come across a bug that can't be fixed until version 3 because it would constitute a breaking change; The headers injected into the route handler via the headers parameter isn't actually a Headers instance but a dict. For now, if you need access to a Headers instance, you'll have to use the method @Alc-Alc provided. If you're fine with a dict, you can just type headers as a dict.

Replies: 3 comments 2 replies

Comment options

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

Comment options

You must be logged in to vote
0 replies
Comment options

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

Answer selected by JacobCoffee
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants