- Add support for SOCKS4 proxies.
- Add
multipart::Form::file()
method for adding files easily. - Add
Body::wrap()
to wrap anyhttp_body::Body
type. - Fix the pool configuration to use a timer to remove expired connections.
- Revert adding
impl Service<http::Request<_>>
forClient
.
- Add support for
danger_accept_invalid_hostnames
forrustls
. - Add
impl Service<http::Request<Body>>
forClient
and&'_ Client
. - Add support for
!Sync
bodies inBody::wrap_stream()
. - Enable happy eyeballs when
hickory-dns
is used. - Fix
Proxy
so thatHTTP(S)_PROXY
values take precendence overALL_PROXY
. - Fix
blocking::RequestBuilder::header()
from unsettingsensitive
on passed header values.
- Add
blocking::ClientBuilder::dns_resolver()
method to change DNS resolver in blocking client. - Add
http3
feature back, still requiringreqwest_unstable
. - Add
rustls-tls-no-provider
Cargo feature to use rustls without a crypto provider. - Fix
Accept-Encoding
header combinations. - Fix http3 resolving IPv6 addresses.
- Internal: upgrade to rustls 0.23.
- Add
zstd
support, enabled withzstd
Cargo feature. - Add
ClientBuilder::read_timeout(Duration)
, which applies the duration for each read operation. The timeout resets after a successful read.
- Add
FromStr
fordns::Name
. - Add
ClientBuilder::built_in_webpki_certs(bool)
to enable them separately. - Add
ClientBuilder::built_in_native_certs(bool)
to enable them separately. - Fix sending
content-length: 0
for GET requests. - Fix response body
content_length()
to return value when timeout is configured. - Fix
ClientBuilder::resolve()
to use lowercase domain names.
- Fix missing ALPN when connecting to socks5 proxy with rustls.
- Fix TLS version limits with rustls.
- Fix not detected ALPN h2 from server with native-tls.
- Fix
ClientBuilder::interface()
when no TLS is enabled. - Fix
TlsInfo::peer_certificate()
being truncated with rustls. - Fix panic if
http2
feature disabled but TLS negotiated h2 in ALPN. - Fix
Display
forError
to not include its source error.
- Upgrade to
hyper
,http
, andhttp-body
v1. - Add better support for converting to and from
http::Request
andhttp::Response
. - Add
http2
optional cargo feature, default on. - Add
charset
optional cargo feature, default on. - Add
macos-system-configuration
cargo feature, default on. - Change all optional dependencies to no longer be exposed as implicit features.
- Add
ClientBuilder::interface(str)
to specify the local interface to bind to. - Experimental: disables the
http3
feature temporarily.
- Add
hickory-dns
feature, deprecatingtrust-dns
. - (wasm) Fix
Form::text()
to not set octet-stream for plain text fields.
- Revert
system-configuration
upgrade, which broke MSRV on macOS.
- Fix
Certificate::from_pem_bundle()
parsing. - Fix Apple linker errors from detecting system proxies.
- Add
Certificate::from_pem_bundle()
to add a bundle. - Add
http3_prior_knowledge()
to blocking client builder. - Remove
Sync
bounds requirement forBody::wrap_stream()
. - Fix HTTP/2 to retry
REFUSED_STREAM
requests. - Fix instances of converting
Url
toUri
that could panic.
- Add
Proxy::custom_http_auth(val)
for setting the rawProxy-Authorization
header when connecting to proxies. - Fix redirect to reject locations that are not
http://
orhttps://
. - Fix setting
nodelay
when TLS is enabled but URL is HTTP. - (wasm) Add
ClientBuilder::user_agent(val)
. - (wasm) add
multipart::Form::headers(headers)
.
- Fix compilation on Windows when
trust-dns
is enabled.
- Add automatically detecting macOS proxy settings.
- Add
ClientBuilder::tls_info(bool)
, which will puttls::TlsInfo
into the response extensions. - Fix trust-dns resolver from possible hangs.
- Fix connect timeout to be split among multiple IP addresses.
- Fix
deflate
decompression back to using zlib, as outlined in the spec.
- Add
ClientBuilder::http1_ignore_invalid_headers_in_responses()
option. - Add
ClientBuilder::http1_allow_spaces_after_header_name_in_responses()
option. - Add support for
ALL_PROXY
environment variable. - Add support for
use_preconfigured_tls
when combined with HTTP/3. - Fix
deflate
decompression from using the zlib decoder. - Fix
Response::{text, text_with_charset}()
to strip BOM characters. - Fix a panic when HTTP/3 is used if UDP isn't able to connect.
- Fix some dependencies for HTTP/3.
- Increase MSRV to 1.63.
- Fix
RequestBuilder::json()
method from overriding a previously setcontent-type
header. An existing value will be left in place. - Upgrade internal dependencies for rustls and compression.
- Upgrade internal dependencies of Experimental HTTP/3 to use quinn v0.9
- (wasm) Fix blob url support
- Chore: set MSRV in
Cargo.toml
. - Docs: fix build on docs.rs
- Add
RequestBuilder
methods to split and reconstruct from its parts. - Add experimental HTTP/3 support.
- Fix
connection_verbose
to logwrite_vectored
calls. - (wasm) Make requests actually cancel if the future is dropped.
- Adds
Proxy::no_proxy(url)
that works like the NO_PROXY environment variable. - Adds
multipart::Part::headers(headers)
method to add custom headers. - (wasm) Add
Response::bytes_stream()
. - Perf: several internal optimizations reducing copies and memory allocations.
- Add
ClientBuilder::dns_resolver()
option for custom DNS resolvers. - Add
ClientBuilder::tls_sni(bool)
option to enable or disable TLS Server Name Indication. - Add
Identity::from_pkcs8_pem()
constructor when usingnative-tls
. - Fix
redirect::Policy::limited(0)
from following any redirects.
- Add
ClientBuilder::resolve_to_addrs()
which allows a slice of IP addresses to be specified for a single host. - Add
Response::upgrade()
to await whether the server agrees to an HTTP upgrade.
- Add HTTP/2 keep-alive configuration methods on
ClientBuilder
. - Add
ClientBuilder::http1_allow_obsolete_multiline_headers_in_responses()
. - Add
impl Service<Request>
forClient
and&'_ Client
. - (wasm) Add
RequestBuilder::basic_auth()
. - Fix
RequestBuilder::header
to not overridesensitive
if user explicitly set on aHeaderValue
. - Fix rustls parsing of elliptic curve private keys.
- Fix Proxy URL parsing of some invalid targets.
- Add
Error::url()
to access the URL of an error. - Add
Response::extensions()
to access thehttp::Extensions
of a response. - Fix
rustls-native-certs
to log an error instead of panicking when loading an invalid system certificate. - Fix passing Basic Authorization header to proxies.
- Add
ClientBuilder::http09_responses(bool)
option to allow receiving HTTP/0.9 responses. - Fix HTTP/2 to retry requests interrupted by an HTTP/2 graceful shutdown.
- Fix proxy loading from environment variables to ignore empty values.
- Update internal webpki-roots dependency.
- Add
blocking::ClientBuilder::resolve()
option, matching the async builder. - Implement
From<tokio::fs::File>
forBody
. - Fix
blocking
request-scoped timeout applying to bodies as well. - (wasm) Fix request bodies using multipart vs formdata.
- Update internal
rustls
to 0.20.
- (wasm) Fix request bodies more.
- Add
ClientBuilder::http1_only()
method. - Add
tls::Version
type, andClientBuilder::min_tls_version()
andClientBuilder::max_tls_version()
methods. - Implement
TryFrom<Request>
forhttp::Request
. - Implement
Clone
forIdentity
. - Fix
NO_PROXY
environment variable parsing to more closely match curl's. Comma-separated entries are now trimmed for whitespace, and*
is allowed to match everything. - Fix redirection to respect
https_only
option. - (wasm) Add
Body::as_bytes()
method. - (wasm) Fix sometimes wrong conversation of bytes into a
JsValue
. - (wasm) Avoid dependency on serde-serialize feature.
- Add
ClientBuilder::resolve()
option to override DNS resolution for specific domains. - Add
native-tls-alpn
Cargo feature to use ALPN with the native-tls backend. - Add
ClientBuilder::deflate()
option anddeflate
Cargo feature to support decoding response bodies using deflate. - Add
RequestBuilder::version()
to allow setting the HTTP version of a request. - Fix allowing "invalid" certificates with the
rustls-tls
backend, when the server uses TLS v1.2 or v1.3. - (wasm) Add
try_clone
toRequest
andRequestBuilder
- Add
impl From<hyper::Body> for reqwest::Body
. - (wasm) Add credentials mode methods to
RequestBuilder
.
- Add
CookieStore
trait to customize the type that stores and retrieves cookies for a session. - Add
cookie::Jar
as a defaultCookieStore
, easing creating some session cookies before creating theClient
. - Add
ClientBuilder::http2_adaptive_window()
option to configure an adaptive HTTP2 flow control behavior. - Add
ClientBuilder::http2_max_frame_size()
option to adjust the maximum HTTP2 frame size that can be received. - Implement
IntoUrl
forString
, making it more convenient to create requests withformat!
.
- Add
ClientBuilder::tls_built_in_root_certs()
option to disable built-in root certificates. - Fix
rustls-tls
glue to more often support ALPN to upgrade to HTTP/2. - Fix proxy parsing to assume
http://
if no scheme is found. - Fix connection pool idle reaping by enabling hyper's
runtime
feature. - (wasm) Add
Request::new()
constructor.
-
Change
multipart
to be an optional cargo feature. -
Remove deprecated methods.
-
Update to Tokio v1.0.
-
Update to Bytes v1.0.
-
Update to hyper v0.14.
- Add
tcp_keepalive
option toblocking::ClientBuilder
. - Add
multipart::Part::stream_with_length
constructor, to create a streaming part with a known length. - Add
ClientBuilder::https_only
option, to allow requiring URLs to behttps
. - Change default
tcp_keepalive
value to be disabled.
- Add
rustls-tls-native-roots
,rustls-tls-webpki-roots
, andrustls-tls-manual-roots
Cargo features, to configure which certificate roots to use with rustls. - Add
ClientBuilder::tcp_keepalive()
method to enable TCP keepalive. - Add
ClientBuilder::http1_writev()
method to force enable or disable vectored writes. - Add
Error::is_connect()
method to identify if the error is related to connection-establishment. - Add
blocking::ClientBuilder::brotli()
method. - Windows: Update default protocol to HTTP for HTTPS system proxies, when a protocol is not specified.
- (wasm) Add support for Cloudflare workers runtime.
- (wasm) Add
ClientBuilder::default_headers()
method. - (wasm) Add
RequestBuilder::build()
method.
- Add
must_use
toRequestBuilder
andClientBuilder
. - Fix Windows system proxy detection of Fiddler proxies.
- (wasm) Add
headers
method toRequestBuilder
. - (wasm) Add
execute
method toClient
. - (wasm) Add
TryFrom<http::Request>
forRequest
. - (wasm) Fix checking for global
window
to work in non-browser environments. - (wasm) Fix sending of an empty body when not required.
- Add
NO_PROXY
environment variable support. - Add more
Error::{is_request, is_body, is_decode}
getters. - Add conversion of
reqwest::ClientBuilder
toreqwest::blocking::ClientBuilder
. - Add
headers_mut()
toreqwest::blocking::Response
. - (wasm) Add
form()
,query()
,multipart
andbearer_auth()
toRequestBuilder
.
- Changed handling of URLs that don't have
http:
orhttps:
schemes, returning an error instead. - Fixed a potential hyper-rustls feature conflict.
- Add
ClientBuilder::pool_idle_timeout
option. - Add
ClientBuilder::pool_max_idle_per_host
option, deprecatemax_idle_per_host
. - Add
Response::content_length
for WASM target. - Enable TCP_NODELAY by default.
- Implement
TryFrom<http::Request>
forblocking::Request
. - Implement
TryFrom<http::Request>
forRequest
.- Removes
From<http::Request>
forRequest
. - This is technically a breaking change, but was a mistake. It was not valid to convert from an
http::Request
to areqwest::Request
in an infallible fashion. It would panic if the conversion was not possible. Instead, the implementation has been changed toTryFrom
to indicate it could fail.
- Removes
- Add
trust-dns
optional feature to change DNS resolver. - Add
bytes()
method toreqwest::blocking::Response
. - Add
buffer()
method toreqwest::blocking::Body
. - Implement
From<http::Request>
forreqwest::Request
.
- Upgrade internal
rustls
version.
- Add Brotli support, enabled with the optional
brotli
feature. - Add
Client::use_preconfigured_tls(tls_connector)
allowing manual configuration of TLS options. - Implement
Default
for blockingClient
,ClientBuilder
, andmultipart::Form
. - (wasm) Add
Response::error_for_status()
method. - (wasm) Add
Response::json()
method. - (wasm) Implement
Default
forClient
andClientBuilder
.
- Add
socks
optional feature to support SOCKS5 proxies. - Add
RequestBuilder::timeout()
to configure a timeout for a single request, instead of using the client's timeout. - Add
ClientBuilder::connection_verbose()
option to enable verbose IO logs. - (wasm) Add
RequestBuilder::fetch_mode_no_cors()
option. - (wasm) Add
Response::url()
getter method.
-
Add
std::future::Future
support. -
Add
wasm32-unknown-unknown
support (with fewer features). -
Add ability to pass async
Response
as thebody
of anotherRequest
. -
Add
Body::as_bytes()
method. -
Add
Response::bytes_stream()
method to get body as animpl Stream
. -
Add
Request::try_clone()
method. -
Change default
Client
API to async. The previous blocking client API is available atreqwest::blocking
. -
Change to no longer send a default
User-Agent
header. Add one viaClientBuilder::user_agent()
. -
Change to enable system/environment proxy detection by default.
-
Change
default-tls
feature to only includeClientBuilder
options that bothnative-tls
andrustls
support. -
Change default feature set to reduce unnecessary dependencies. Most features are disabled by default:
blocking
: Thereqwest::blocking
(synchronous) client API.cookies
: Cookie store support.gzip
: Automatic response body decompression.json
: Request and response JSON body methods.stream
:futures::Stream
support.
-
Change
Error
internal design, removing severalError::is_*
inspector methods. -
Change Redirect API:
- Renamed types to be part of the
redirect
module (for example,reqwest::RedirectPolicy
is nowreqwest::redirect::Policy
). - Removed
loop_detected
andtoo_many_redirect
methods fromredirect::Attempt
, replaced with a genericerror
method. - The default policy no longer specifically looks for redirect loops (but they should be caught by the maximum limit).
- Renamed types to be part of the
-
Fix checking
HTTP_PROXY
environment variable if it the environment is from a CGI script. -
Fix removal of username/password of parsed proxy URL.
-
Update
url
to v2.0. -
Update
hyper
to v0.13. -
Update
http
to v0.2.
- Add
ClientBuilder::use_sys_proxy()
to enable automatic detect of HTTP proxies configured on the system. - Add
ClientBuilder::no_proxy()
to disable system proxies. This is the default for 0.9, but will change to detecting system proxies by default in 0.10. - Add support for streaming request bodies in the async client.
- Add
async::Response::text()
that returns aFuture
of the full body decoded to aString
. - Add
Clone
forCertificate
.
- Fix
Cookie
headers to no longer send as percent-encoded (instead, exactly as sent by the server).
- Fix
Cookie
headers so as to not include attributes from theSet-Cookie
(likeHttpOnly
,Secure
, etc).
- Add
Response::text_with_charset()
to allow setting the default charset to decode. - Add
Error::source()
implementation. - Add
async::ClientBuilder::timeout()
option, will timeout the connect, request, and response body futures. - Fix gzip + chunked transfer encoding issue preventing connection reuse.
- Fix
RequestBuilder::query()
to not add just"?"
if the encoded query is empty. - Fix including new cookie headers when response is a redirect.
- Fix sending of "appended" request headers.
- Add optional support for SOCKS5 proxies, by enabling the
socks5
cargo 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
Proxy
to check the URL for a username and password.
- Fix panic on some invalid
Location
headers during redirects (error is logged and redirect response is returned instead). - Fix instance when server notices streaming request body is complete before reqwest does.
- 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.
- Fix capitalization error in async
RequestBuilder::basic_auth()
. - Fix ALPN causing issues when using a Proxy.
- Add
multipart::Form::percent_encode_noop()
to allow for servers which don't support percent encoding of parameters. - 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.
- Add
ClientBuilder::local_address()
to bind to a local IP address. - Add
Response::error_for_status_ref()
to return anError
while borrowing aResponse
.
- Fix
Identity::from_pem
withrustls-tls
backend when using RSA private keys.
- 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.
- Revert default DNS resolver to
getaddrinfo
in a threadpool. There is now atrust-dns
optional feature to enable the Trust-DNS resolver. - Detect
Certificate
andIdentity
errors at construction time.
- Fix DNS resolver on Android (reverted back to
getaddrinfo
). - Fix sending unicode
filename
s inmultipart/form-data
requests.
- Add
Proxy::basic_auth
method to support proxy authorization. - Add
rustls-tls
optional feature to use rustls instead of native-tls. - Add
try_clone
method toRequest
andRequestBuilder
. - Add
reqwest::async::multipart
support, similar to the synchronous API. - Adds
default-tls-vendored
optional feature to vendor OpenSSL.
- Fix panic from top-level
reqwest::get
if client builder fails to build. - Removed timeout waiting for
reqwest::Client
runtime to startup. - Fix
RequestBuilder::headers
to properly append extra headers of the same name.
- Replaced DNS threadpool using
getaddrinfo
with a non-blocking DNS resolver.
- Adds
Response::remote_addr()
method to check the address of the connection used. - Adds
default-tls
crate feature, enabled by default, which allows users to disable TLS.
- Adds
percent_encoding_path_segment
andpercent_encoding_attr_char
configuration tomultipart::Form
.
- Reverts
multipart::Form
default percent encoding format topath-segment
.
- Adds
multipart::Part::bytes()
to create a part of raw bytes. - Adds constructors for
Response
to help with testing.
- Properly percent-encoding more illegal characters in multipart filenames.
- Ensure timed out requests cancel the associated async task.
- Fix panic when
Location
header has UTF-8 characters.
- Fix large request bodies failing because of improper handling of backpressure.
- Remove body-related headers when redirect changes a
POST
into aGET
. - Reduce memory size of
Response
andError
signicantly.
- 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()
andheaders_mut()
tomultipart::Part
to allow sending extra headers for a specific part. - Moved
request::unstable::async
toreqwest::async
.
- Fix panicking when passing a
Url
with afile://
scheme. Instead, anError
is returned.
-
Changed
ClientBuilder::danger_disable_hostname_verification()
toClientBuilder::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 movedreqwest::unstable::async
toreqwest::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
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()?;
- Fix docs.rs/reqwest build.
- Send an extra CRLF at the end of multipart requests, since some servers expect it.
- Removed internal dependency on
tokio-proto
, which removed unsafesmall-vec
dependency.
- Add
RedirectAttempt::status
to check status code that triggered redirect. - Add
RedirectPolicy::redirect
method publicly, to allow composing policies.
- Try to auto-detect encoding in
Response::text()
. - Add
Certificate::from_pem
to load PEM encoded client certificates. - Allow unsized types in
query
,form
, andjson
. - Add
unstable::async::RequestBuilder::query
, mirroring the stable builder method.
- Add
RequestBuilder::query
to easily adjust query parameters of requests.
- Upgrades internal log crate usage to v0.4
- Enable hyper's
no_proto
config, fixing several bugs in hyper.
- 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 aString
. - Add
Response::copy_to
as shortcut forstd::io::copy
.
- Client TLS Certificates (#43)
- GZIP decoding has been added to the async Client (#161)
ClientBuilder
andRequestBuilder
hold their errors till consumed (#189)async::Response::body()
now returns a reference to the body instead of consuming theResponse
- A default timeout for
reqwest::Client
is used set to 30 seconds (#181)
-
Client::new
no longer returns aResult
.To handle any panics that come from
Client::new
, the builder can be used instead. -
ClientBuilder
andRequestBuilder
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 theResponse
. -
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 thetimeout
method. PassingNone
will disable the timeout, reverting to the pre-0.8 behavior.
Proxy::custom(fn)
to allow dynamically picking a proxy URL
- fix occasional panic when program exits while
Client
orResponse
are dropping.
- fix a panic when redirecting and a
Authorization<Basic>
header was added (https://github.com/seanmonstar/reqwest/commit/cf246d072badd9b31b487e7a0b00490e4cc9584f) - fix redirects so that a GET will follow 307/308 responses (https://github.com/seanmonstar/reqwest/commit/2d11a4bd7167e1bf3a35b62f5aeb36d5d294e56e)
- fix remove accidental
println
s in the sending of a body - some documentation improvements
- Proxy support (#30)
- Self-signed TLS certificates (#97)
- Disabling TLS hostname validation (#89)
- A
Request
type 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
Client
remains. - Timeouts now affect DNS and socket connection.
- Pool much better at evicting sockets when they die.
- An
unstable
Cargo feature to enablereqwest::unstable::async
.
- Synchronous
- A huge docs improvement!
- Publicly exports
RedirectAction
andRedirectAttempt
Error::get_ref
returnsError + Send + Sync
- hyper has been upgraded to 0.11, so
header
,StatusCode
, andMethod
have breaking changes. mime
has been upgraded to 0.3, with a very different API.- All configuration methods have been removed from the
Client
, and moved to theClientBuilder
. - The
HttpVersion
type was completely removed. Error::cause()
now returnsError::get_ref().cause()
.- All methods on
Client
that start aRequestBuilder
now return aResult
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 aStatusCode
instead of&StatusCode
.
- adds
Client::referer(bool)
option to disable setting theReferer
header during redirects (https://github.com/seanmonstar/reqwest/commit/bafcd7ae6fc232856dd6ddb8bf5b20dbbbfe0bc9)
- fixes filtering sensitive headers during redirects (seanmonstar#10)
- fixes sending of the Referer to an HTTP site when coming from HTTPS, and removes username and fragment explicitly (https://github.com/seanmonstar/reqwest/commit/d8696045b4c6bc4d9e33789cff6a9e1fa75462d7)
- documentation updates
- adds
Error::get_ref
to get the underlying error that may have occurred. Includes a'static
bounds, which allows for downcasting (as opposed toError::cause
).
- Upgraded to serde
1.0
- Added a
url
method toError
, which returns a possible associatedUrl
that occurred with this error. - Added
req.basic_auth(user, optional_pass)
method to ease usingBasic
authentication.
- 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. Error
is no longer anenum
, but an opaque struct. Details about it can be checked withstd::error::Error::cause()
, and methods onreqwest::Error
includeis_http()
,is_serialization()
, andis_redirect()
.RedirectPolicy::custom
receives different arguments, and returns different values. See the docs for an example.
- fix panic with Gzip decoder on an empty body (seanmonstar#82)
- add
Clone
implementation forClient
- Automatic GZIP decoding: By default,
Client
will try to decode any responses that appear to be gzip encoded (based on headers). This can be disabled viaclient.gzip(false)
(https://github.com/seanmonstar/reqwest/commit/ab5e477a123319efd4b17f3666b41b44ec244bee) - Specify a timeout for requests using
client.timeout(duration)
. (https://github.com/seanmonstar/reqwest/commit/ec049fefbae7355f6e4ddbbc7ebedcadb30e1e04) - Request bodies with a known length can be constructed with
Body::sized()
(https://github.com/seanmonstar/reqwest/commit/82f1877d4b6cba2fac432670ec306160aee5c501) - Add
Client.put
,Client.patch
, andClient.delete
convenience methods (https://github.com/seanmonstar/reqwest/commit/c37b8aa0338ac4142763d206c6df79856915056d, https://github.com/seanmonstar/reqwest/commit/4d6582d22b23c27927e481a9c8a83ad08cfd1a2a, https://github.com/seanmonstar/reqwest/commit/a3983f3122b2d1495ea36bb5a8fd019a7605ae56) - Add
reqwest::mime
(https://github.com/seanmonstar/reqwest/commit/0615c6d65e03ba9cb5364169c9e74f4f2a91554b)
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)
.
- updated to serde 0.9
- updated to hyper 0.10
- add
Response.json()
method (https://github.com/seanmonstar/reqwest/commit/2d10ecc99e2aaed66616294baaf65380b446e1c6) - add
RedirectPolicy
(https://github.com/seanmonstar/reqwest/commit/e92b3e862a1a94c0b4173a7d49a315bc121da31e) - set an
Accept: */*
header by default if noAccept
header is set (https://github.com/seanmonstar/reqwest/commit/559ae8011a2c098f4fe1821ec1d3444a46f4bf5e) - add support for 307 and 308 redirects (https://github.com/seanmonstar/reqwest/commit/a54447c1d9c75dab639333265f51a91a43e99c2e)
- implement
Sync
forClient
, andSend
forRequestBuilder
andResponse
(https://github.com/seanmonstar/reqwest/commit/d18a53b3fcc81c4a60875755c8e95d777a343319) - implement
Send
forError
(https://github.com/seanmonstar/reqwest/commit/20b161096e67d22c962e69b2656ae9741ac73c25) - implement
std::fmt::Debug
for all public types (https://github.com/seanmonstar/reqwest/commit/d624b0ef29020c6085ec94651a990f58ccd684e2)
Error::Serialize
now has aBox<StdError + Send + Sync>
instead ofBox<StdError>
RequestBuilder
no longer has an associated lifetime (wasRequestBuilder<'a>
)
Initial release: http://seanmonstar.com/post/153221119046/introducing-reqwest