Skip to content

Using Hyper headers in Rocket 0.5 #1719

Answered by jebrosen
barlindhaug asked this question in Questions
Discussion options

You must be logged in to vote

So my question is how I should use the Into<Header> implementation.

Yes, a lot of these have been lost between 0.4 and 0.5-rc. That's now a mismatch in documentation, so this text will need to be updated or removed.

Rocket 0.4 was based on hyper 0.10, which included those typed headers, and rocket re-exported them. The typed headers were removed some time between then and hyper 0.13, and we haven't yet found a suitable replacement (see issue #1067). The most recent attempt was in #1535 using the hyperx crate, but the performance costs were deemed too high to go with that approach. Unfortunately, the next-best and more performant option, headers, has some usability issues; in particular …

Replies: 1 comment

Comment options

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