#hyper::client::Client working example w/ http1_preserve_header_case & nativeTls

16 messages · Page 1 of 1 (latest)

plain bobcat
#

I would greatly appreciate if someone would provide or point me to a working example of how to create a hyper client built w/ http1_preserve_header_case and using nativeTls from a PEM based certificate.

crude reef
plain bobcat
# crude reef <https://docs.rs/native-tls/latest/native_tls/struct.Certificate.html#method.fro...

thank you! I saw all the pieces but wasn't sure how to put them together. I'll give that a try. FWIW, I actually had native-tls from a PEM working w/ reqwest but then I discovered that the legacy system restful service that I needed to send requests used case sensitive matches for HTTP header keys instead of insensitive per the standard, so then I discovered that reqwest did NOT support (please correct me if I'm wrong) hyper::client::Builder:: http1_preserve_header_case(), so I'm having to refactor to use hyper instead.

plain bobcat
plain bobcat
#

unfortunately, after further review, the legacy system service uses camel case for HTTP header keys and not title case so reqwest::ClientBuilder::http1_title_case_headers() isn't going to work and reqwest doesn't expose http1_preserve_header_case() as far as I can tell, so back to plan B and use your hyper solution above. Thanks!

crude reef
#

wtf

#

camel case http headers

#

thats like

#

wtf

#

no