All Versions
74
Latest Version
Avg Release Cycle
30 days
Latest Release
-

Changelog History
Page 6

  • v0.9.0 Changes

    ๐Ÿ”‹ 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.8 Changes

    • ๐Ÿ›  Fix docs.rs/reqwest build.
  • v0.8.7 Changes

    ๐Ÿ›  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 Changes

    ๐Ÿ”‹ Features

    • โž• Add RedirectAttempt::status to check status code that triggered redirect.
    • โž• Add RedirectPolicy::redirect method publicly, to allow composing policies.
  • v0.8.5 Changes

    ๐Ÿ”‹ 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 Changes

    ๐Ÿ”‹ Features

    • โž• Add RequestBuilder::query to easily adjust query parameters of requests.
  • v0.8.3 Changes

    ๐Ÿ”‹ Features

    • โฌ†๏ธ Upgrades internal log crate usage to v0.4
  • v0.8.2 Changes

    ๐Ÿ›  Fixes

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

    ๐Ÿ”‹ 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.
  • v0.8.0 Changes

    ๐Ÿ”‹ Features

    • Client TLS Certificates (#43)
    • GZIP decoding has been added to the async Client (#161)
    • ClientBuilder and RequestBuilder hold their errors till consumed (#189)
    • async::Response::body() now returns a reference to the body instead of consuming the Response
    • 0๏ธโƒฃ A default timeout for reqwest::Client is used set to 30 seconds (#181)

    ๐Ÿ’ฅ Breaking Changes

    • Client::new no longer returns a Result.

    To handle any panics that come from Client::new, the builder can be used instead.

    • ClientBuilder and RequestBuilder hold their errors till consumed (#189).

    This means a bunch of ? will be going away, but means using the builders will be far easier now. Any error encountered inside the builders will now be returned when the builder is consumed.

    To get errors back immediately, the Request type can be used directly, by building pieces separately and calling setters.

    • async::Response::body() now returns a reference to the body instead of consuming the Response.
    • 0๏ธโƒฃ A default timeout for reqwest::Client is used set to 30 seconds (#181)

    For uses where the timeout is too short, it can be changed on the ClientBuilder, using the timeout method. Passing None will disable the timeout, reverting to the pre-0.8 behavior.