Skip to content

Releases: seanmonstar/reqwest

v0.8.0

02 Oct 19:33
Compare
Choose a tag to compare

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
  • A default timeout for reqwest::Client is used set to 30 seconds (#181)
  • Multipart support! (#4)

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.

  • 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.

v0.7.3

19 Aug 23:20
Compare
Choose a tag to compare

Features

  • Proxy::custom(fn) to allow dynamically picking a proxy URL

Fixes

  • fix occasional panic when program exits while Client or Response are dropping.

v0.7.2

25 Jul 20:01
Compare
Choose a tag to compare
  • fix a panic when redirecting and a Authorization<Basic> header was added (cf246d0)
  • fix redirects so that a GET will follow 307/308 responses (2d11a4b)

v0.7.1

13 Jul 19:38
Compare
Choose a tag to compare
  • fix remove accidental printlns in the sending of a body
  • some documentation improvements

v0.7.0

11 Jul 20:31
Compare
Choose a tag to compare

Features

  • Proxy support (#30)
  • Self-signed TLS certificates (#97)
  • Disabling TLS hostname validation ⚠️ (#89)
  • A Request type that can be used instead of the RequestBuilder (#85)
  • Add Response::error_for_status() to easily convert 400 and 500 status responses into an Error (#98)
  • Upgrade hyper to 0.11
    • Synchronous Client remains.
    • Timeouts now affect DNS and socket connection.
    • Pool much better at evicting sockets when they die.
    • An unstable Cargo feature to enable reqwest::unstable::async.
  • A huge docs improvement!

Fixes

  • Publicly exports RedirectAction and RedirectAttempt
  • Error::get_ref returns Error + Send + Sync

Breaking Changes

  • hyper has been upgraded to 0.11, so header, StatusCode, and Method have breaking changes.
  • mime has been ugpraded to 0.3, with a very different API.
  • All configuration methods have been removed from the Client, and moved to the ClientBuilder.
  • The HttpVersion type was completely removed.
  • Error::cause() now returns Error::get_ref().cause().
  • All methods on Client that start a RequestBuilder now return a Result immediately, instead of delaying the URL parse error for later.
  • The RequestBuilder methods all take &mut self, instead of moving the builder, and return &mut Self. (This shouldn't actually affect most people who are building a request in a single chain.)
  • Response::status() returns a StatusCode instead of &StatusCode.

Thanks 🎉

v0.6.2

29 May 17:59
Compare
Choose a tag to compare
  • adds Client::referer(bool) option to disable setting the Referer header during redirects (bafcd7a)
  • fixes filtering sensitive headers during redirects (#10)
  • fixes sending of the Referer to an HTTP site when coming from HTTPS, and removes username and fragment explicitly (d869604)
  • documentation updates

Thanks

@rap2hpoutre
@steverob

v0.6.1

13 May 05:12
Compare
Choose a tag to compare
  • adds Error::get_ref to get the underlying error that may have occurred. Includes a 'static bounds, which allows for downcasting (as opposed to Error::cause).

v0.6.0

10 May 21:45
Compare
Choose a tag to compare

Features

  • Upgraded to serde 1.0
  • Added a url method to Error, which returns a possible associated Url that occurred with this error.
  • Added req.basic_auth(user, optional_pass) method to ease using Basic authentication.

Breaking Changes

  • The publicly exposed peer dependency serde was upgraded. It is now [email protected]. Mismatched version will give a compiler error that a serde trait is not implemented.
  • Error is no longer an enum, but an opaque struct. Details about it can be checked with std::error::Error::cause(), and methods on reqwest::Error include is_http(), is_serialization(), and is_redirect().
  • RedirectPolicy::custom receives different arguments, and returns different values. See the docs for an example.

Thanks

Thanks to these contributors who helped get this stuff into this release:

v0.5.2

05 May 21:48
Compare
Choose a tag to compare
  • fix panic with Gzip decoder on an empty body #82

v0.5.1

05 Apr 18:53
Compare
Choose a tag to compare

Features

  • add Clone implementation for Client