Commit Graph

906 Commits

Author SHA1 Message Date
Jonas Platte
3879694c09 Add TryFrom<Request> for HttpRequest<Option<Body>> 2021-08-26 13:42:46 -07:00
Jan Verbeek
66c1b48167 Add options for specifying the TLS version (#1315) 2021-08-12 09:41:32 -07:00
David Leslie
bdc57beabb fix: respect https_only option when redirecting (#1313) 2021-08-02 16:50:15 -07:00
Saruniks
e6a1a09f09 Fix compile error when target is wasm and multipart feature is enabled. (#1296) 2021-06-30 19:13:42 -07:00
Mohamed Daahir
bccefe7486 add option to disable http2 upgrade (#1292)
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2021-06-24 18:00:06 -07:00
Jan Verbeek
d9308f1b26 Fix documentation of http1_title_case_headers() (#1294)
Case is not preserved either way, so the old text was misleading.
2021-06-24 14:30:53 -07:00
Sean McArthur
b9cf2db697 CI: make a single final job that depends on all others (#1291) 2021-06-23 11:24:18 -07:00
nickelc
eee19c5f3c Fix bare url warnings in multipart docs (#1289) 2021-06-22 07:18:46 -07:00
Sean McArthur
f5fe17876a v0.11.4 2021-06-21 14:58:56 -07:00
Chris Campbell
8e5af459e5 Allow overriding of DNS resolution to specified IP addresses(#561) (#1277)
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
2021-06-16 14:41:08 -07:00
K.J. Valencik
c4388fcff9 WASM: Add try_clone implementations to Request and RequestBuilder (#1286)
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.
2021-06-14 10:36:56 -07:00
Mohamed Daahir
b48cb4a5aa Add native-tls-alpn feature (#1283) 2021-06-09 17:05:29 -07:00
dependabot[bot]
bbeb1ede4e Bump ssri from 6.0.1 to 6.0.2 in /examples/wasm_github_fetch (#1262)
Bumps [ssri](https://github.com/npm/ssri) from 6.0.1 to 6.0.2.
- [Release notes](https://github.com/npm/ssri/releases)
- [Changelog](https://github.com/npm/ssri/blob/v6.0.2/CHANGELOG.md)
- [Commits](https://github.com/npm/ssri/compare/v6.0.1...v6.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 12:39:12 -07:00
dependabot[bot]
841d47c6a2 Bump url-parse from 1.4.7 to 1.5.1 in /examples/wasm_github_fetch (#1267)
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.4.7 to 1.5.1.
- [Release notes](https://github.com/unshiftio/url-parse/releases)
- [Commits](https://github.com/unshiftio/url-parse/compare/1.4.7...1.5.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 12:16:47 -07:00
dependabot[bot]
33bc7939b4 Bump lodash from 4.17.19 to 4.17.21 in /examples/wasm_github_fetch (#1269)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 11:48:29 -07:00
Jens Reimann
b0af278f78 Implement "default" functions of the trait to fix "insecure" mode (#1259)
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
2021-04-28 17:19:46 -07:00
Mohamed Daahir
8d3e27966c use ZlibDecoder for deflate responses (#1257) 2021-04-26 16:52:29 -07:00
Mark Lodato
b88f309339 Fix small typos in Client docs (#1253) 2021-04-22 10:37:17 -07:00
Mohamed Daahir
77ee0df7c5 Support Deflate decoding (#1250) 2021-04-22 10:35:29 -07:00
bensadiku
42b31600c3 WASM: set RequestCredentials to None by default (#1249)
Closes #1247
2021-04-21 09:42:09 -07:00
Marco Ieni
9293cd2061 CI: check documentation (#1246) 2021-04-19 16:22:04 -07:00
bensadiku
18dfac4fe2 Add RequestBuilder::version() method to set HTTP version (#1243)
Closes #1240
2021-04-14 19:03:22 -07:00
Sean McArthur
7afade446c v0.11.3 2021-04-12 15:50:10 -07:00
Camille TJHOA
43725ac1ee Add wasm integration tests to CI (#657) (#1237) 2021-04-12 15:47:20 -07:00
Jon Gjengset
7d8c32784e impl From<hyper::Body> for Body (#1236)
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.
2021-04-08 13:21:29 -07:00
xushaodong
1614c5ea64 supports wasm fetch credentials 2021-04-06 12:42:05 -07:00
Sean McArthur
81c0b6685a Up MSRV to 1.46.0 2021-04-06 11:48:09 -07:00
dependabot[bot]
97af751665 Bump y18n from 4.0.0 to 4.0.1 in /examples/wasm_github_fetch (#1232)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-06 10:40:38 -07:00
Sebastian Klähn
c6eb2c4fcb Fix typo in cookies.rs (#1225) 2021-03-23 15:34:17 -07:00
kotborealis
29b15cb1d2 Updated documentation in examples (#1219)
Documentation in examples recommends using
`tokio 0.2` as dependency, while README.md
recomends `tokio 0.1`.
I've updated comments according to readme.
2021-03-22 11:26:50 -07:00
Sean McArthur
dada01ef65 Fix unused lint for tokio's enter guard in blocking::wait (#1223) 2021-03-22 11:26:36 -07:00
Pawan Singh Bisht
544282a0b4 proxy: refactor a collapsible_match (#1214) 2021-03-17 09:51:51 -07:00
dependabot[bot]
c666b293a1 Bump elliptic from 6.5.3 to 6.5.4 in /examples/wasm_github_fetch
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.3 to 6.5.4.
- [Release notes](https://github.com/indutny/elliptic/releases)
- [Commits](https://github.com/indutny/elliptic/compare/v6.5.3...v6.5.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-09 14:02:08 -08:00
Sean McArthur
80999a8963 v0.11.2 2021-03-09 11:05:35 -08:00
Sean McArthur
12d7905520 Add CookieStore trait and expose default Jar (#1203)
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>
2021-03-08 15:40:58 -08:00
Enno Boland
2414042269 replace match ... { } with matches! macro where possible (#1208) 2021-03-08 15:02:45 -08:00
CfirTsabari
a856638316 Check format to all rs files under src (#1188)
fixed-format of all missing files.
Fixes seanmonstar/reqwest#1186
2021-03-01 17:06:14 -08:00
Ibraheem Ahmed
9fa58e316d Implement IntoUrl for String (#1201)
Also change from blanket impl to improve docs.
2021-03-01 15:50:29 -08:00
Sven-Hendrik Haase
ff2381e61e Add http2_adaptive_window and htt2_max_frame_size from hyper (#1194)
Fixes #1193.
2021-02-22 16:37:28 -08:00
nickelc
6ac97dc3aa Add minimal versions check for nightly CI job (#1197) 2021-02-22 16:13:50 -08:00
Kornel
61a955c821 Bump mime to current version (#1196) 2021-02-21 08:42:16 -08:00
meldron
dabb878f32 update native-tls to v0.2.7 (#1183)
Update to v0.2.7 to prevent possible build error (#1181) caused by
incompatible native-tls version < v0.2.7

Co-authored-by: Bernd Kaiser <bk@dfjk.eu>
2021-02-19 05:51:01 -08:00
Sean McArthur
8689aa47e0 v0.11.1 2021-02-18 10:41:02 -08:00
Matt Briggs
f5450f534a support http proxy addresses with no scheme
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.
2021-02-18 10:04:11 -08:00
nickelc
c27cd06a11 Use doc_cfg to show feature requirements (#1134)
* Use `doc_cfg` to show feature requirements

* Apply suggestions from code review
2021-02-17 16:48:08 -08:00
Rakshith Ravi
727903f69a Make Request constructor public for wasm environments (#1173)
Closes #1171
2021-02-13 08:19:11 -08:00
Markus Westerlind
2940740493 fix: Upgrade to http2 if the server reports that it supports it (#1166)
The test is disabled as the test server does not support TLS currently
but otherwise I'd expect it to pass (tested in another project).
2021-02-10 13:16:22 -08:00
glyphpoch
ad21b62fd2 Fix Android CI build (#1169)
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.
2021-02-09 06:22:14 -08:00
Sean McArthur
287a6d1852 Lint: fix unused Identity if only using default-tls (#1164) 2021-02-08 14:25:09 -08:00
glyphpoch
e56bd160ba Enable hyper's runtime feature (#1162) (#1163)
`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.
2021-02-05 16:36:50 -08:00