Skip to content

3.0.0-rc.0

Pre-release
Pre-release

Choose a tag to compare

@neonmoe neonmoe released this 12 Apr 15:28

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::Error type to be non-exhaustive, to make adding new errors later possible, and added new variants: NativeTlsCreateConnection, OpenSslCreateConnection, InvalidProtocol, and InvalidProtocolInRedirect.
  • 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::headers and ResponseLazy::headers from HashMap<String, String> to Vec<(String, String)>, and removed lowercase normalization of the field names.
    • To help the usual case, there's two new functions, Response::header and Response::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 use str::eq_ignore_ascii_case to find your header(s).
  • The query parameter function to take AsRef<str> instead of Into<String> to avoid unnecessary allocations. Thanks for the PR, @alpha-tango-kilo! (#69)
  • Response::status_code and ResponseLazy::status_code type from i32 to u16. Thanks for the suggestion, @ModProg!
    (#118)
  • Renamed features https-bundled to https-openssl, https-bundled-probe to https-openssl-probe, and https-native to https-native-tls to make them a little more obvious in what they bring in.

Removed

  • Iterator impl for ResponseLazy, see the addition section for more on the new Read impl. Thanks for the PR, @mrkline! (#104)

Added

  • Response::header and Response::headers for ergonomically sorting through the headers of a response, now that they aren't in a convenient HashMap anymore.
  • Read impl for ResponseLazy. This improves performance, and the Read trait generally matches the functionality better than Iterator. Thanks for the PR, @mrkline! (#104)