Open fimbault opened 3 years ago
Hey there! What specifically do you think the http
crate would need to do? For turning HTTP headers into stronger Rust types, there's https://docs.rs/headers.
Hi, Thanks for pointing that out. Indeed that's a good starting point to implement the structured fields (item, list, dict). There might be a few differences to take into account, as the usage is a bit different compared to common headers:
pub struct HeaderValue<'a> { inner: Cow<'a, str>}
, similar in spirit to #467 Are either of those needed for this specific issue? Or can they be tracked in those existing issues?
My original question is if there's anything specific we need to do to support structured fields? I think after reading through that RFC, we don't need to do anything here. It's more a way for a user to decide how to parse a header value, which we provide as a byte string. Is that right?
Probably yes. Mostly for hyper, the decision is to either include this in the core http library, or keep it separate. Same issue as in the go community.
The other issues can live separately, would probably help if resolved (for convenience and perf) but are not mandatory to get forward.
Crossposting here for reference https://github.com/http-rs/http-types/issues/344#issuecomment-1032804690
Hi, any plan to include support for parsing and serializing structured headers? (RFC8941)