This change allows users to bypass the selected DNS resolver for
specific domains. The allows, for example, to make calls to a local TLS
server by rerouting a given domain to 127.0.0.1.
The approach I've taken for the design is to wrap the resolver in an
outer service. This leads to a fair amount of boilerplate code mainly to
be able to explain the typing to the compiler. The actual business logic
is very simple for the number of lines involved.
Closes#561
Currently the wasm client does not implement `try_clone` on `Request` or `RequestBuilder` like the blocking and async clients.
This PR adds infallible `try_clone` implementations to the wasm client to improve the API parity.
*Note*: Even though these APIs are infallible on wasm (no streaming bodies), I chose to keep the API identical.
Ignoring validation seems broken as some default functions actually do
check. That is fine for the proper TLS validation, but gets in the way
when someone wants to skip TLS validation (e.g. for self-signed
certificates).
This change re-implements these default functions in a way that they
do not check, but return "success" all the time.
Fixes#1210
This implements a conversion from `hyper::Body` to `reqwest::Body`,
which in turn enables converting a `http::Request<hyper::Body>` into
`reqwest::Request` through the existing `TryFrom` implementation.
Fixes#1156.
Documentation in examples recommends using
`tokio 0.2` as dependency, while README.md
recomends `tokio 0.1`.
I've updated comments according to readme.
This adds a new trait, `CookieStore`, which allows for custom
implementations of storage for a client's cookies. After implementing,
you can call `ClientBuilder::cookie_provider` to use it over the
default storage.
The default store is exposed as `Jar`, to ease the most common use case
which is to add a few cookies to the store when creating a client.
Co-authored-by: Patrick Fernie <patrick.fernie@gmail.com>
Other implementations (curl and Go) accept HTTPS_PROXY values with no
protocol scheme. When the scheme is not present, http:// is assumed.
For example 192.168.1.1 is interpreted as http://192.168.1.1
This commit adds support for http proxy addresses without a scheme by
retrying the URL parsing mechanisms with http:// prepended.
Use "cross" to cross-compile reqwest for Android. The job currently
errors out because the default linker doesn't know what to do with
object files generated for Android.
`hyper` implements idle connection cleanup by spawning a new task which
drops the connection after a while. This mechanism requires Tokio, so it
is hidden behing the "runtime" feature, which reqwest doesn't enable,
making some connections stay in the pool forever. Fixes#1162.