Commit Graph

411 Commits

Author SHA1 Message Date
quininer
a27db28deb fix proxy missing alpn (#466)
* fix #459

* disable alpn for proxy connection
2019-03-06 11:02:55 -08:00
Sean McArthur
d7475d61f2 v0.9.11 2019-03-04 11:41:54 -08:00
Ian Smith
215981e7a0 Add percent_encode_noop configuration to Form (#467)
Some implementations of multipart/form parsing don't support alternate
encodings, but do allow unicode in 'standard' parameter values. This
change allows users to specify that they do not want to encode
parameters.

(See also: #419, #420.)
2019-03-04 11:21:35 -08:00
Antoine Carton
aa8348ba1e Add http1_title_case_headers option to ClientBuilder (#463) 2019-02-27 13:21:50 -08:00
Constantin Nickel
4fba983e5e async/client: return a impl Future on execute() 2019-02-20 17:59:12 -08:00
Sean McArthur
cd0e4b3c2e Add Error::is_timeout() accessor 2019-02-20 15:15:55 -08:00
Sean McArthur
9e2b56ba56 Add connect_timeout to async and sync clients 2019-02-20 15:15:55 -08:00
Sean McArthur
66db8d6283 refactor connect_async module into connect module 2019-02-20 15:15:55 -08:00
Sean McArthur
5deb5705f5 v0.9.10 2019-02-18 11:54:14 -08:00
Manuel Alejandro
f96f9454fd Fixing Identity::from_pem which was failing when there was a PKCS1 RSA private key but not PKCS8 key (#458) 2019-02-16 12:30:18 -08:00
Michael Habib
e49f5ee404 add Response::error_for_status_ref to allow borrowing (#457) 2019-02-15 14:33:18 -08:00
Luca Bruno
0c84e6b9e9 async/request: add a basic example for send() 2019-02-15 10:33:57 -08:00
Luca Bruno
8b62f47ac3 async/request: return a impl Future on send() 2019-02-15 10:33:57 -08:00
Luca Bruno
5e38b419f0 async/reponse: return a impl Future on json() 2019-02-15 10:33:57 -08:00
Michael Habib
4dc679d535 Add ClientBuilder::local_address option to bind to a local IP address (#451)
Closes #414
2019-02-11 10:40:16 -08:00
Sean McArthur
d2eee8591a v0.9.9 2019-01-23 12:20:44 -08:00
Sean McArthur
cf33fc907c Document the multipart module
Closes #444
2019-01-23 12:16:12 -08:00
Evan Schwartz
6e8e781f8f Add ClientBuilder::h2_prior_knowlege() (#443)
resolves https://github.com/seanmonstar/reqwest/issues/413
2019-01-18 14:15:57 -08:00
Sean McArthur
021851afd4 Enable h2 ALPN with rustls-tls backend 2019-01-18 11:53:56 -08:00
Sean McArthur
68e98d54ea Add Response::content_length() method 2019-01-18 11:42:27 -08:00
Sean McArthur
10c0e64711 v0.9.8 2019-01-11 17:33:29 -08:00
Sean McArthur
4d221533a2 Switch trust-dns to an off-by-default optional feature 2019-01-11 17:30:10 -08:00
Sean McArthur
81b4d26682 Try to detect Certificate and Identity errors earlier 2019-01-11 15:43:00 -08:00
Sean McArthur
23e13304ef Disable trust-dns on Windows
Closes #431
2019-01-11 12:34:03 -08:00
Sean McArthur
a8174feca4 v0.9.7 2019-01-10 13:58:23 -08:00
Sean McArthur
2649f9ab56 Remove trust-dns when target_os is Android 2019-01-10 13:52:35 -08:00
Sean McArthur
b71787be86 refactor DNS resolver construction
- System Conf is read as `ClientBuilder::build()` time, providing the
  error earlier.
- If there is an error reading the resolve system conf, a better error
  is reported.
- Resolver only needs to lock a mutex once to spawn the background task,
  instead of every single `resolve` call.
2019-01-10 12:47:29 -08:00
Shou Ya
b129ab0bb4 fix multipart with unicode filename (#420) 2019-01-08 21:01:52 -08:00
Martin Taibr
5578c77597 Fix typos (#422) 2019-01-08 12:12:50 -08:00
Sean McArthur
3112d99b7c v0.9.6 2019-01-07 15:44:37 -08:00
Sean McArthur
fa8736f851 remove unneeded features from tokio dependency 2019-01-07 15:37:18 -08:00
Sean McArthur
691bcfe894 improve general documentation 2019-01-07 14:20:39 -08:00
Sean McArthur
56eff821fd refactor multipart to reduce duplicate code between sync and async 2019-01-07 13:40:04 -08:00
Kevin Wilson
4c21127f15 add async multipart request handling 2019-01-07 10:57:51 -08:00
Sean McArthur
11d7812e88 rename Incompatile error kind to TlsIncompatible 2019-01-04 14:46:58 -08:00
Sean McArthur
ad854c3ee8 add Proxy::basic_auth support
Closes #322
2019-01-04 14:40:19 -08:00
Sean McArthur
b9f4661332 rename TLSBackend to TlsBackend 2019-01-03 12:43:22 -08:00
Sean McArthur
9c0c5ca42d Fix RequestBuilder::headers to include multiple values
`RequestBuilder::headers` will always overwrite any existing header with
the same name, but will now correctly append extra values from the *new*
header map.

Closes #407
2019-01-03 12:28:03 -08:00
Sean McArthur
dd5b95fc06 document native-tls-vendored and rustls-tls features 2019-01-03 11:33:20 -08:00
Sean McArthur
9ddc45438c remove no-longer-needed docs_rs_workaround 2019-01-03 11:29:46 -08:00
Sean McArthur
0f4055f9ec remove Error::is_runtime_startup accessor 2019-01-03 11:07:09 -08:00
Sean McArthur
59f57072ac Remove timeout waiting for runtime thread to start 2019-01-03 09:36:54 -08:00
Sean McArthur
3877e8729c add Error::is_runtime_startup() method 2019-01-02 11:12:25 -08:00
Sean McArthur
4df232efad Return an Error instead of panic if sync Client cannot startup runtime.
The timeout is also increased to 10 seconds from 5.

Closes #392
2018-12-26 17:15:58 -08:00
Sean McArthur
c4985674aa remove Inner noise from Error Debug format 2018-12-19 11:23:35 -08:00
Sean McArthur
44837c1b69 Replace getaddrinfo resolver with trust-dns-resolver 2018-12-18 12:54:22 -08:00
Sean McArthur
49d2905011 allow deprecated Error::cause in test 2018-12-17 13:28:57 -08:00
Sean McArthur
11962e36ab allow deprecated on Error::cause 2018-12-17 12:23:30 -08:00
quininer
37039760f8 Add rustls support (#390) 2018-12-17 11:57:43 -08:00
polyfloyd
9cbd8c41ad Add try_clone to Request and RequestBuilder (#387)
The need to clone a request or builder may arise when repeating a
request multiple times. This can be either because:
* The Request object is consumed by Client::execute
* The request might need to be retried later
* A complex request needs to be repeated with slightly different
  parameters, such as in the Partial-Content scheme which allows seeking
  through the content of large object over HTTP by performing multiple
  HTTP GET requests.

To make this easier, it would be nice if Request and RequestBuilder
were to implement the Clone trait. However, this is not possible because
a body might be set that is a stream which can not be cloned. To get
around this, I added a try_clone function that fails if the body is not
clonable.

An alternative solution would be to add a type parameter to Request for
the body so a conditional implementation for Clone can be added.
2018-12-17 11:55:06 -08:00