16 KiB
v0.9.14
- Add optional support for SOCKS5 proxies, by enabling the
socks5cargo feature. - Add Cookie Store support to
Client, automatically handling cookies for a session.
- Add
ClientBuilder::cookie_store(enable: bool)method to enable a cookie store that persists across requests. - Add
Response::cookies()accessor that allows iterating over response cookies.
- Fix
Proxyto check the URL for a username and password.
v0.9.13
Fixes
- Fix panic on some invalid
Locationheaders during redirects (error is logged and redirect response is returned instead). - Fix instance when server notices streaming request body is complete before reqwest does.
v0.9.12
Features
- Add
ClientBuilder::tcp_nodelay()to allow disabling Nagle's algorithm. - Add
ClientBuilder::max_idle_per_host()to allow reducing the number of idle pooled connections. - Add
RequestBuilder::bearer_auth()method to async builder.
Fixes
- Fix capitalization error in async
RequestBuilder::basic_auth(). - Fix ALPN causing issues when using a Proxy.
v0.9.11
Features
- Add
multipart::Form::percent_encode_noop()to allow for servers which don't support percent encoding of paramters. - Add
ClientBuilder::http1_title_case_headers()to force request headers to use Title-Case. - Add
ClientBuilder::connect_timeout()to allow setting only a connect timeout.
v0.9.10
Features
- Add
ClientBuilder::local_address()to bind to a local IP address. - Add
Response::error_for_status_ref()to return anErrorwhile borrowing aResponse.
Fixes
- Fix
Identity::from_pemwithrustls-tlsbackend when using RSA private keys.
v0.9.9
Features
- Add
ClientBuilder::h2_prior_knowledge()option to force HTTP2. - Add
Response::content_length()to get the content-length of a response. - Enable ALPN h2 with the rustls-tls backend.
v0.9.8
Fixes
- Revert default DNS resolver to
getaddrinfoin a threadpool. There is now atrust-dnsoptional feature to enable the Trust-DNS resolver. - Detect
CertificateandIdentityerrors at construction time.
v0.9.7
Fixes
- Fix DNS resolver on Android (reverted back to
getaddrinfo). - Fix sending unicode
filenames inmultipart/form-datarequests.
v0.9.6
Features
- Add
Proxy::basic_authmethod to support proxy authorization. - Add
rustls-tlsoptional feature to use rustls instead of native-tls. - Add
try_clonemethod toRequestandRequestBuilder. - Add
reqwest::async::multipartsupport, similar to the synchronous API. - Adds
default-tls-vendoredoptional feature to vendor OpenSSL.
Fixes
- Fix panic from top-level
reqwest::getif client builder fails to build. - Removed timeout waiting for
reqwest::Clientruntime to startup. - Fix
RequestBuilder::headersto properly append extra headers of the same name.
Performance
- Replaced DNS threadpool using
getaddrinfowith a non-blocking DNS resolver.
v0.9.5
Features
- Adds
Response::remote_addr()method to check the address of the connection used. - Adds
default-tlscrate feature, enabled by default, which allows users to disable TLS.
v0.9.4
Features
- Adds
percent_encoding_path_segmentandpercent_encoding_attr_charconfiguration tomultipart::Form.
Fixes
- Reverts
multipart::Formdefault percent encoding format topath-segment.
v0.9.3
Features
- Adds
multipart::Part::bytes()to create a part of raw bytes. - Adds constructors for
Responseto help with testing.
Fixes
- Properly percent-encoding more illegal characters in multipart filenames.
- Ensure timed out requests cancel the associated async task.
v0.9.2
Fixes
- Fix panic when
Locationheader has UTF-8 characters.
v0.9.1
Fixes
- Fix large request bodies failing because of improper handling of backpressure.
- Remove body-related headers when redirect changes a
POSTinto aGET. - Reduce memory size of
ResponseandErrorsignicantly.
v0.9.0
Features
- Upgrade to
tokio0.1. - Upgrade to
hyper0.12. - Upgrade to
native-tls0.2. - Add
ClientBuilder::danger_accept_invalid_certs(bool)to disable certificate verification. - Add
RequestBuilder::bearer_auth(token)to ease sending bearer tokens. - Add
headers()andheaders_mut()tomultipart::Partto allow sending extra headers for a specific part. - Moved
request::unstable::asynctoreqwest::async.
Fixes
- Fix panicking when passing a
Urlwith afile://scheme. Instead, anErroris returned.
Breaking Changes
-
Changed
ClientBuilder::danger_disable_hostname_verification()toClientBuilder::danger_accept_invalid_hostnames(bool). -
Changed
ClientBuilderto 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
RequestBuilderto be a by-value builder of by-ref.See the previous note about
ClientBuilderfor affected code and how to change it. -
Removed the
unstablecargo-feature, and movedreqwest::unstable::asynctoreqwest::async. -
Changed
multipart::Part::mime()tomime_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
hyper0.12 means a temporary removal of the typed headers.The
RequestBuilderhas 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-011cargo-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
- Fix docs.rs/reqwest build.
v0.8.7
Fixes
- Send an extra CRLF at the end of multipart requests, since some servers expect it.
- Removed internal dependency on
tokio-proto, which removed unsafesmall-vecdependency.
v0.8.6
Features
- Add
RedirectAttempt::statusto check status code that triggered redirect. - Add
RedirectPolicy::redirectmethod publicly, to allow composing policies.
v0.8.5
Features
- Try to auto-detect encoding in
Response::text(). - Add
Certificate::from_pemto load PEM encoded client certificates. - Allow unsized types in
query,form, andjson. - Add
unstable::async::RequestBuilder::query, mirroring the stable builder method.
v0.8.4
Features
- Add
RequestBuilder::queryto easily adjust query parameters of requests.
v0.8.3
Features
- Upgrades internal log crate usage to v0.4
v0.8.2
Fixes
- Enable hyper's
no_protoconfig, fixing several bugs in hyper.
v0.8.1
Features
- Add
ClientBuilder::default_headersto set headers used for every request. - Add
async::ClientBuilder::dns_threadsto set number of threads use for DNS. - Add
Response::textas shortcut to read the full body into aString. - Add
Response::copy_toas shortcut forstd::io::copy.
v0.8.0
Features
- Client TLS Certificates (#43)
- GZIP decoding has been added to the async Client (#161)
ClientBuilderandRequestBuilderhold their errors till consumed (#189)async::Response::body()now returns a reference to the body instead of consuming theResponse- A default timeout for
reqwest::Clientis used set to 30 seconds (#181)
Breaking Changes
-
Client::newno longer returns aResult.To handle any panics that come from
Client::new, the builder can be used instead. -
ClientBuilderandRequestBuilderhold 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
Requesttype can be used directly, by building pieces separately and calling setters. -
async::Response::body()now returns a reference to the body instead of consuming theResponse. -
A default timeout for
reqwest::Clientis used set to 30 seconds (#181)For uses where the timeout is too short, it can be changed on the
ClientBuilder, using thetimeoutmethod. PassingNonewill disable the timeout, reverting to the pre-0.8 behavior.
v0.7.3
Features
Proxy::custom(fn)to allow dynamically picking a proxy URL
Fixes
- fix occasional panic when program exits while
ClientorResponseare dropping.
v0.7.2
Fixes
- fix a panic when redirecting and a
Authorization<Basic>header was added (cf246d072b) - fix redirects so that a GET will follow 307/308 responses (
2d11a4bd71)
v0.7.1
Fixes
- fix remove accidental
printlns in the sending of a body - some documentation improvements
v0.7.0
Features
- Proxy support (#30)
- Self-signed TLS certificates (#97)
- Disabling TLS hostname validation (#89)
- A
Requesttype that can be used instead of theRequestBuilder(#85) - Add
Response::error_for_status()to easily convert 400 and 500 status responses into anError(#98) - Upgrade hyper to 0.11
- Synchronous
Clientremains. - Timeouts now affect DNS and socket connection.
- Pool much better at evicting sockets when they die.
- An
unstableCargo feature to enablereqwest::unstable::async.
- Synchronous
- A huge docs improvement!
Fixes
- Publicly exports
RedirectActionandRedirectAttempt Error::get_refreturnsError + Send + Sync
Breaking Changes
- hyper has been upgraded to 0.11, so
header,StatusCode, andMethodhave breaking changes. mimehas been ugpraded to 0.3, with a very different API.- All configuration methods have been removed from the
Client, and moved to theClientBuilder. - The
HttpVersiontype was completely removed. Error::cause()now returnsError::get_ref().cause().- All methods on
Clientthat start aRequestBuildernow return aResultimmediately, instead of delaying the URL parse error for later. - The
RequestBuildermethods 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 aStatusCodeinstead of&StatusCode.
v0.6.2
Features
- adds
Client::referer(bool)option to disable setting theRefererheader during redirects (bafcd7ae6f)
Fixes
- fixes filtering sensitive headers during redirects (https://github.com/seanmonstar/reqwest/issues/10)
- fixes sending of the Referer to an HTTP site when coming from HTTPS, and removes username and fragment explicitly (
d8696045b4) - documentation updates
v0.6.1
Features
- adds
Error::get_refto get the underlying error that may have occurred. Includes a'staticbounds, which allows for downcasting (as opposed toError::cause).
v0.6.0
Features
- Upgraded to serde
1.0 - Added a
urlmethod toError, which returns a possible associatedUrlthat occurred with this error. - Added
req.basic_auth(user, optional_pass)method to ease usingBasicauthentication.
Breaking Changes
- The publicly exposed peer dependency serde was upgraded. It is now
serde@1.0. Mismatched version will give a compiler error that a serde trait is not implemented. Erroris no longer anenum, but an opaque struct. Details about it can be checked withstd::error::Error::cause(), and methods onreqwest::Errorincludeis_http(),is_serialization(), andis_redirect().RedirectPolicy::customreceives different arguments, and returns different values. See the docs for an example.
v0.5.2
Fixes
- fix panic with Gzip decoder on an empty body (https://github.com/seanmonstar/reqwest/issues/82)
v0.5.1
Features
- add
Cloneimplementation forClient
v0.5.0
Features
- Automatic GZIP decoding: By default,
Clientwill try to decode any responses that appear to be gzip encoded (based on headers). This can be disabled viaclient.gzip(false)(ab5e477a12) - Specify a timeout for requests using
client.timeout(duration). (ec049fefba) - Request bodies with a known length can be constructed with
Body::sized()(82f1877d4b) - Add
Client.put,Client.patch, andClient.deleteconvenience methods (c37b8aa033,4d6582d22b,a3983f3122) - Add
reqwest::mime(0615c6d65e)
Breaking Changes
The only breaking change is a behavioral one, all programs should still compile without modification. The automatic GZIP decoding could interfere in cases where a user was expecting the GZIP bytes, either to save to a file or decode themselves. To restore this functionality, set client.gzip(false).
v0.4.0
- updated to serde 0.9
v0.3.0
- updated to hyper 0.10
v0.2.0
Features
- add
Response.json()method (2d10ecc99e) - add
RedirectPolicy(e92b3e862a) - set an
Accept: */*header by default if noAcceptheader is set (559ae8011a) - add support for 307 and 308 redirects (
a54447c1d9) - implement
SyncforClient, andSendforRequestBuilderandResponse(d18a53b3fc) - implement
SendforError(20b161096e) - implement
std::fmt::Debugfor all public types (d624b0ef29)
Breaking Changes
Error::Serializenow has aBox<StdError + Send + Sync>instead ofBox<StdError>RequestBuilderno longer has an associated lifetime (wasRequestBuilder<'a>)
v0.1.0
Initial release: http://seanmonstar.com/post/153221119046/introducing-reqwest