Commit Graph

632 Commits

Author SHA1 Message Date
Sean McArthur
35c6ddd00b v0.10.0 2019-12-30 10:25:44 -08:00
Sean McArthur
09e7fe62e3 Don't set User-Agent header by default (#751) 2019-12-23 12:48:11 -08:00
Sean McArthur
47734f55f4 Replace futures-channel with tokio::sync in blocking client (#748) 2019-12-23 12:01:23 -08:00
Sean McArthur
0ab5df39cc Add Response::bytes_stream() (#750)
This converts the `Response` into a `Stream` of `Bytes`.

Closes #734
2019-12-23 11:38:39 -08:00
Sean McArthur
24abf2fcbd Separate default-tls and native-tls features (#749)
To allow for the default-tls to change to a different backend by
default, this adds a new `native-tls` optional feature. Any TLS feature
that was only available using native-tls now requires the `native-tls`
feature to be enabled.
2019-12-20 13:22:56 -08:00
Sean McArthur
18fd9a63b0 Re-enable rustls (#747) 2019-12-19 11:43:03 -08:00
Sean McArthur
c4c754c0fd Remove a few unused public pieces from the cookie module (#744) 2019-12-17 11:49:51 -08:00
Sean McArthur
ce43f80d8b Refactor Redirect API (#741)
Changed the redirect types to be from the `redirect` module:

- `reqwest::RedirectPolicy` is now `reqwest::redirect::Policy`
- `reqwest::RedirectAttempt` is now `reqwest::redirect::Attempt`
- `reqwest::RedirectAction` is now `reqwest::redirect::Action`

Changed behavior of default policy to no longer check for redirect loops
(loops should still be caught eventually by the maximum limit).

Removed the `too_many_redirects` and `loop_detected` methods from
`Action`.

Added `error` to `Action` that can be passed any error type.

Closes #717
2019-12-16 15:57:09 -08:00
nickelc
382f1c0e6a Export the ResponseBuilderExt trait again (#738) 2019-12-16 11:40:51 -08:00
Sean McArthur
5d639ecbde docs typo in proxies note 2019-12-12 13:22:24 -08:00
Sean McArthur
a57afd50ea Reduce futures optional features (#737) 2019-12-12 12:34:44 -08:00
Sean McArthur
be52c4d558 support url with authority (#736) 2019-12-11 13:42:45 -08:00
Sean McArthur
7631c0390e Rename 'unstable-stream' feature to 'stream' (#733) 2019-12-10 16:55:53 -08:00
Gleb Pomykalov
0f32c4a01a Update to hyper 0.13 2019-12-10 16:24:05 -08:00
Rodolfo P A
80ba8cc150 Implement Default for Client, ClientBuilder and Form (#712) 2019-11-21 11:52:17 -08:00
Nathan West
3a24cc1d4b Reimplemented RequestBuilder::basic_auth to use Base64Encoder (#713) 2019-11-19 10:45:14 -08:00
Sean McArthur
43e15e2094 v0.10.0-alpha.2 2019-11-12 10:14:39 -08:00
Lucas
3b23593262 Add as_bytes method to Body (#708) 2019-11-11 13:12:22 -08:00
Matthijs Brobbel
1ce6731f2d Fix a link in doc (#706) 2019-11-07 16:06:04 -08:00
Daniel Lee
8a6bdb7a82 Update documentation to show usage of system proxies (#702)
Add several lines that explain the usage of proxies in the current
version. Introduce the familiar HTTP(S)_PROXY syntax so often seen
in http(s) clients.

Closes #685
2019-11-07 11:42:48 -08:00
tobdob
3a50ed11f8 Implement try_clone for async requests (#698)
Fixes #533
2019-11-04 18:14:40 -08:00
John Gallagher
f6f81f9cc1 wasm: Add request body in the form of Bytes (#696)
* Add body bytes

* Add example and header creation code
2019-11-04 09:17:05 -08:00
Christian Bourjau
b24b0be461 wasm: Add bytes method to wasm response (#694)
the bytes method was missing from the Response object of the wasm32
compilation target.
2019-10-30 13:32:31 -07:00
John Gallagher
43f2ff083c Add error to JsValue conversion and example (#691) 2019-10-30 13:30:32 -07:00
Artem Vorotnikov
cfc312f8dd Remove remnants of old typed headers (#690) 2019-10-23 12:18:06 -07:00
Paolo Barbolini
dd65fc7c3a wasm: translate over response headers (#689)
Closes #656
2019-10-21 13:55:42 -07:00
Sean McArthur
40d4d05e4e Remove username and password when parsing proxies (#686) 2019-10-17 17:27:25 -07:00
Sean McArthur
31e64e9f28 prevent using HTTP_PROXY if detected inside CGI (#684) 2019-10-17 16:21:39 -07:00
Kyle Huey
6433db78b1 Add http2 window setters to ClientBuilder (#659) 2019-10-17 15:01:37 -07:00
Sean McArthur
7739e03123 Enable "system" proxies by default (#683)
If no proxies are configured for a client, the environment (system) will
be inspected automatically to set up proxies.

Configuring a `Proxy` on a client or calling `no_proxy` will disable the
use of the automatic system proxy.

Closes #403
2019-10-17 13:32:00 -07:00
Sean McArthur
8583dd2b4c Replace uuid dependency with tiny internal RNG (#679) 2019-10-15 14:54:26 -07:00
lzutao
5e5e6e9040 chore(deps): bump wasm-bindgen-futures (#675) 2019-10-14 11:25:17 -07:00
lzutao
a9dd94a99f doc: make encoding_rs link clickable (#674) 2019-10-14 11:24:12 -07:00
Sean McArthur
6b5726aaa8 Improve fmt::Debug of Client and ClientBuilder 2019-10-09 13:46:39 -07:00
Sean McArthur
75ee4646ac v0.10.0-alpha.1 2019-10-08 14:00:20 -07:00
Sean McArthur
bb3d672cd8 re-organize builder methods for docs purposes 2019-10-03 14:42:15 -07:00
Sean McArthur
7c1d0b9f13 remove deprecated dns_threads method 2019-10-03 13:51:02 -07:00
Sean McArthur
5b55aee1a9 Send user-agent in proxy tunnel requests 2019-10-03 10:34:51 -07:00
Sean McArthur
cba1e4e82e Update tokio and hyper alphas 2019-10-01 14:26:42 -07:00
Sean McArthur
ebe57e10a3 Put Stream APIs behind unstable-stream feature 2019-09-27 17:00:15 -07:00
Constantin Nickel
24394364eb Make json an optional feature (default off) 2019-09-27 12:27:23 -07:00
Sean McArthur
932defd879 Introduce unstable, incomplete WASM support 2019-09-26 10:01:08 -07:00
Sean McArthur
6413a4349e Update tokio and hyper alphas 2019-09-25 14:19:37 -07:00
Sean McArthur
f71227d968 Make gzip an optional feature (default off) 2019-09-23 15:46:25 -07:00
Sean McArthur
7e3c1bc461 Make the blocking API an optional feature (default off) 2019-09-18 12:39:02 -07:00
Sean McArthur
0a87d3d7da Make cookies an optional feature (default off) 2019-09-17 16:50:54 -07:00
Sean McArthur
53495e1526 Redesign Error type
- The `Error`'s kind is a now a set of variants depending on the context
  of when an error could occur.
- If another error was the cause, it is now always the `source`.

Along with the `is_*` methods, this should help in understanding *when*
a certain error occurred. For example, an error setting the TLS
certificates will return a builder error, with the TLS error as the
source. This should help differentiate from a TLS error that happens
when connecting to a server.

It also makes the internal code less dependent on all the exact
dependencies that can be enabled or disabled.
2019-09-17 14:23:22 -07:00
Constantin Nickel
6b5be07158 Sync async/blocking ClientBuilder::gzip doc comment 2019-09-17 09:48:26 -07:00
SOFe
23e8a4d58e Fixed incorrect description of ClientBuilder::gzip
"inflate" actually means decompress in the context of DEFLATE. "deflate" reduces the size of something, i.e. compression, and inflate is the opposite, i.e. decompression.
2019-09-13 11:24:23 -07:00
Constantin Nickel
b1a90eb402 Prune the futures dependencies 2019-09-12 07:52:31 -07:00