Commit Graph

886 Commits

Author SHA1 Message Date
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
Mark Hildreth
326b8a7769 Marked sensitive headers as such in docs (#1160) 2021-02-05 11:02:38 -08:00
William Chargin
9ae11b26fc Document that blocking and async do not mix (#1159)
See discussion on #1017. This patch adds documentation to `blocking` at
module level and to its `Client::new` and `ClientBuilder::build`, noting
that you can’t create or use a blocking client from within an async
runtime, and suggesting potential alternatives.

Presumably, all the other methods on `Client` also have this property,
but hitting the failure mode would require building a `blocking::Client`
outside an async runtime and then moving it into a runtime to send
requests; seems potentially not worth polluting all the docs.

Test Plan:
Ran `cargo doc --features blocking` and verified that the links work.

wchargin-branch: docs-blocking-no-async
wchargin-source: 0eb36352959cd2ca0b19df5836e75230dc619b9d
2021-02-05 11:00:11 -08:00
Alexis Mousset
31b11c3f4c Add a tls_built_in_root_certs option for Client (#1150) 2021-01-27 06:39:36 -08:00
Sean McArthur
bd9ff9f371 v0.11.0 2021-01-05 10:19:00 -08:00
nickelc
afed48cafd Make multipart an optional feature (default off) (#1128) 2021-01-04 13:20:17 -08:00
Rust大闸蟹
1f425a0244 example: update usage doc for blocking example (#1112) 2020-12-30 12:05:01 -08:00
Paolo Barbolini
3fb2c1c143 Remove deprecated features (#1124) 2020-12-30 10:24:57 -08: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
Muhammad Hamza
5ee4fe5ab6 Fix documentation line in for wasm Response 2020-12-20 07:27:35 -08:00
varoonp123
73990a7a42 Add From<Bytes> for blocking::Body (#1114) 2020-12-15 07:22:44 -08:00
Sean McArthur
5099192b92 v0.10.10 2020-12-14 14:37:37 -08:00
Sean McArthur
46efd05810 Change default tcp_keepalive value to be disabled (#1113) 2020-12-14 13:42:35 -08:00
dependabot[bot]
3ca0bd98e8 Bump ini from 1.3.5 to 1.3.8 in /examples/wasm_github_fetch (#1111)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-11 16:28:58 -08:00
Rust大闸蟹
cdfdae5ecd Fix comment in blocking example (#1107) 2020-12-10 07:13:13 -08:00
Martin André
541d0c2aba Add https_only() for ClientBuilder (#1102)
Closes #980
2020-12-09 10:40:46 -08:00
Corey Farwell
474d9eff9b Document how a RequestBuilder gets constructed (#1097) 2020-12-09 07:17:37 -08:00
Martin André
a2133aec3b blocking: add tcp_keepalive option (#1100) 2020-12-07 07:56:56 -08:00
Zicklag
3cd9c29b30 Fix system HTTP proxy to send proxy-authorization (#1021)
Previously, HTTP proxies loaded from the system settings were not
respected for non-HTTPS requests. Now the PROXY_AUTHORIZATION header is
supplied on HTTP requests with a system proxy.
2020-11-24 10:34:38 -08:00
Konrad Borowski
e7be3eda04 Make wasm-bindgen-test a dev dependency 2020-11-24 07:04:21 -08:00
Taylor Thomas
2ca0e26cfa feat(multipart): Adds support for manually setting size
I also added a simple sanity test to make sure it doesn't override
a `Body` with an actual size. I also double checked that this works
with a project where we are using streams.

Closes #1090
2020-11-23 11:10:26 -08:00