Using Hyper headers in Rocket 0.5 #1719
-
I've started migrating to rocket 0.5 and ran into an issue when using hyper headers.
Looking at rocket::http::struct::Header::new, I see
So my question is how I should use the Previously on rocket 0.4 the code was
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
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 …