Repository navigation
2.0.0
The big API-breaking update.
Added
- API for loading the HTTP response body through an iterator, allowing for processing of the data during the download.
- See the
ResponseLazydocumentation for more information.
- See the
- Error type for all the errors that this crate can run into for easier
?usage and better debuggability. - Punycode support for non-ascii hostnames via the
punycodefeature. - Trailer header support.
- Examples
hello,iterator, andjson.
Changed
- Breaking, will cause problems not detectable by the compiler: Response headers' field names are now in lowercase, as they are case-insensitive and this makes getting header values easier. The values are unaffected. So if your code has
response.headers.get("Content-Type"), you have to change it toresponse.headers.get("content-type"), or it will not return what you want. - Breaking: Restructure the
Responsestruct:- Removed
bytesandbody_bytes. - Added
as_bytes(),into_bytes(), andas_str()in their place.
- Removed
- Breaking: Changed the
with_bodyparameter type toInto<Vec<u8>>fromInto<String>.Strings implementInto<Vec<u8>>, so this shouldn't cause any problems, unless you're using some interesting types that implementInto<String>but notInto<Vec<u8>>.
- Clean up the crate internals overall. Note: This might cause instability, if you're very concerned about stability, please hold off upgrading for a while.
- Remove
panic!when trying to make anhttps://request without thehttpsfeature. The request will now return an error instead. The library should not panic anymore. - Audit the remaining
unwrap()s from library code, none of them should actually ever cause a panic now.
Removed
create_requestin favor of just usingResponse::new.