22 Commits

Author SHA1 Message Date
David Leslie
bdc57beabb fix: respect https_only option when redirecting (#1313) 2021-08-02 16:50:15 -07:00
messense
a19eb34196 Update to tokio 1.0, bytes 1.0 (#1076)
Co-authored-by: Wim Looman <git@nemo157.com>
Co-authored-by: Paolo Barbolini <paolo@paolo565.org>
2020-12-30 09:57:50 -08:00
stevelr
4fe07d81cf add ClientBuilder.default_headers() for wasm32 target (#1084) 2020-11-16 13:09:47 -08:00
Sean McArthur
04980689ce Newest rustfmt changes 2020-02-06 10:17:40 -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
Gleb Pomykalov
0f32c4a01a Update to hyper 0.13 2019-12-10 16:24:05 -08:00
Sean McArthur
6413a4349e Update tokio and hyper alphas 2019-09-25 14:19:37 -07:00
Sean McArthur
f4100e4148 Rewrite tests with a hyper server instead of raw TCP
This makes the tests much less brittle, by not depending on the exact
order of the HTTP headers, nor always requiring to check for every
single header.
2019-09-23 14:06:01 -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
87a09322d6 Make the async Client default (#626)
The previously default Client is moved to `reqwest::blocking`, while the
async client becomes the main API.

Closes #622
2019-09-09 17:20:51 -07:00
danieleades
cf8944a0f0 cargo fmt (#604)
Run rustfmt and setup CI to check for it.
2019-08-29 09:52:39 -07:00
WindSoilder
e0a52dcf5d Include new cookie header after a redirect (#514)
Closes #510
2019-04-30 15:15:41 -07:00
Jerome Gravel-Niquet
77434a29aa Fix overwriting of appended request headers (#493)
* don't overwrite appended user headers

* Fixes tests, all header ordering related

* does not need to clone default headers, added a test
2019-04-15 12:33:03 -07:00
Sean McArthur
5c3494b81d Check redirect locations are valid Uris (#486)
Closes #484
2019-04-01 11:13:01 -07:00
Sean McArthur
acd23d057a fix tests generating an extra blank Txn for each server 2018-10-17 14:17:08 -07:00
Yash Srivastav
c417d6dab8 Upgrade hyper to 0.12
Closes #304
2018-07-05 10:03:31 -07:00
knight42
2bd558d8c7 test: add tests for setting default headers 2017-10-22 13:06:05 +08:00
Sean McArthur
779f8080ef change Builders to only error at the end
Closes #189
2017-08-31 18:10:45 -07:00
Sean McArthur
df4b6bd8db fix broken test now that hyper does not include content-length when body is empty 2017-07-28 14:17:19 -07:00
Sean McArthur
2d11a4bd71 fix 307/308 redirects with GET requests 2017-07-24 16:11:54 -07:00
Sean McArthur
665b4fe718 upgrade hyper to v0.11 2017-06-21 09:47:21 -07:00