3.0.0-rc.0
Pre-release
Pre-release
This is the first release candidate for 3.0. If no issues are found, I'll release 3.0 in a few weeks.
Includes all the planned changes that have been accumulating over the years for 3.0, renames some features, but otherwise tries to keep everything the same as 2.0. Note that everything under Changed and Removed here is a breaking change.
Changed
- MSRV from 1.48 to 1.63, and updated the policy to be looser (now tracking Debian oldstable's Rust version instead of settling on a specific version until eternity, and the MSRV no longer applies to any optional features).
- The
minreq::Errortype to be non-exhaustive, to make adding new errors later possible, and added new variants:NativeTlsCreateConnection,OpenSslCreateConnection,InvalidProtocol, andInvalidProtocolInRedirect. - The default proxy port to 1080, to match curl.
- The default maximum sizes for the response status line and headers, both 8KiB.
- The type of
Response::headersandResponseLazy::headersfromHashMap<String, String>toVec<(String, String)>, and removed lowercase normalization of the field names.- To help the usual case, there's two new functions,
Response::headerandResponse::headers, to get the header value (or all values, if there are multiple of the same header) by field name. In other cases, iterate through and usestr::eq_ignore_ascii_caseto find your header(s).
- To help the usual case, there's two new functions,
- The query parameter function to take
AsRef<str>instead ofInto<String>to avoid unnecessary allocations. Thanks for the PR, @alpha-tango-kilo! (#69) Response::status_codeandResponseLazy::status_codetype fromi32tou16. Thanks for the suggestion, @ModProg!
(#118)- Renamed features
https-bundledtohttps-openssl,https-bundled-probetohttps-openssl-probe, andhttps-nativetohttps-native-tlsto make them a little more obvious in what they bring in.
Removed
Iteratorimpl forResponseLazy, see the addition section for more on the newReadimpl. Thanks for the PR, @mrkline! (#104)
Added
Response::headerandResponse::headersfor ergonomically sorting through the headers of a response, now that they aren't in a convenientHashMapanymore.Readimpl forResponseLazy. This improves performance, and theReadtrait generally matches the functionality better thanIterator. Thanks for the PR, @mrkline! (#104)