Skip to content

Releases: seanmonstar/reqwest

v0.9.2

13 Nov 22:16
Compare
Choose a tag to compare

Fixes

  • Fix panic when Location header has UTF-8 characters.

v0.9.1

13 Nov 22:16
Compare
Choose a tag to compare

Fixes

  • Fix large request bodies failing because of improper handling of backpressure.
  • Remove body-related headers when redirect changes a POST into a GET.
  • Reduce memory size of Response and Error signicantly.

v0.9.0

18 Sep 21:42
Compare
Choose a tag to compare

Features

  • Upgrade to tokio 0.1.
  • Upgrade to hyper 0.12.
  • Upgrade to native-tls 0.2.
  • Add ClientBuilder::danger_accept_invalid_certs(bool) to disable
    certificate verification.
  • Add RequestBuilder::bearer_auth(token) to ease sending bearer tokens.
  • Add headers() and headers_mut() to multipart::Part to allow sending
    extra headers for a specific part.
  • Moved request::unstable::async to reqwest::async.

Fixes

  • Fix panicking when passing a Url with a file:// scheme. Instead, an
    Error is returned.

Breaking Changes

  • Changed ClientBuilder::danger_disable_hostname_verification()
    to ClientBuilder::danger_accept_invalid_hostnames(bool).

  • Changed ClientBuilder to be a by-value builder instead of by-ref.

    For single chains of method calls, this shouldn't affect you. For code that
    conditionally uses the builder, this kind of change is needed:

    // Old
    let mut builder = ClientBuilder::new();
    if some_val {
        builder.gzip(false);
    }
    let client = builder.build()?;
    
    // New
    let mut builder = ClientBuilder::new();
    if some_val {
        builder = builder.gzip(false);
    }
    let client = builder.build()?;
  • Changed RequestBuilder to be a by-value builder of by-ref.

    See the previous note about ClientBuilder for affected code and
    how to change it.

  • Removed the unstable cargo-feature, and moved reqwest::unstable::async
    to reqwest::async.

  • Changed multipart::Part::mime() to mime_str().

    // Old
    let part = multipart::Part::file(path)?
        .mime(mime::TEXT_PLAIN);
    
    // New
    let part = multipart::Part::file(path)?
        .mime_str("text/plain")?;
  • The upgrade to hyper 0.12 means a temporary removal of the typed headers.

    The RequestBuilder has simple methods to set headers using strings, which
    can work in most places.

    // Old
    client
        .get("https://hyper.rs")
        .header(UserAgent::new("hallo"))
        .send()?;
    
    // New
    client
        .get("https://hyper.rs")
        .header("user-agent", "hallo")
        .send()?;

    To ease the transition, there is a hyper-011 cargo-feature that can be
    enabled.

    [dependencies]
    reqwest = { version = "0.9", features = ["hyper-011"] }

    And then usage:

    client
        .get("https://hyper.rs")
        .header_011(reqwest::hyper_011::header::UserAgent::new("hallo"))
        .send()?;

v0.8.7

31 Jul 20:50
Compare
Choose a tag to compare

Fixes

  • Send an extra CRLF at the end of multipart requests, since some servers expect it.
  • Removed internal dependency on tokio-proto, which removed unsafe small-vec
    dependency.

v0.8.6

31 Jul 20:51
Compare
Choose a tag to compare

Features

  • Add RedirectAttempt::status to check status code that triggered redirect.
  • Add RedirectPolicy::redirect method publicly, to allow composing policies.

v0.8.5

31 Jul 20:51
Compare
Choose a tag to compare

Features

  • Try to auto-detect encoding in Response::text().
  • Add Certificate::from_pem to load PEM encoded client certificates.
  • Allow unsized types in query, form, and json.
  • Add unstable::async::RequestBuilder::query, mirroring the stable builder method.

v0.8.4

31 Jul 20:51
Compare
Choose a tag to compare

Features

  • Add RequestBuilder::query to easily adjust query parameters of requests.

v0.8.3

31 Jul 20:50
Compare
Choose a tag to compare

Features

  • Upgrades internal log crate usage to v0.4

v0.8.2

19 Dec 21:39
Compare
Choose a tag to compare

Fixes

  • Enable hyper's no_proto config, fixing several bugs in hyper.

v0.8.1

08 Nov 01:23
Compare
Choose a tag to compare

Features

  • Add ClientBuilder::default_headers to set headers used for every request.
  • Add async::ClientBuilder::dns_threads to set number of threads use for DNS.
  • Add Response::text as shortcut to read the full body into a String.
  • Add Response::copy_to as shortcut for std::io::copy.

Thanks!