Commit Graph

36 Commits

Author SHA1 Message Date
Jonas Platte
2881354c90 Fix more clippy warnings 2021-08-26 13:42:46 -07:00
Jonas Platte
3879694c09 Add TryFrom<Request> for HttpRequest<Option<Body>> 2021-08-26 13:42:46 -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
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
bensadiku
42b31600c3 WASM: set RequestCredentials to None by default (#1249)
Closes #1247
2021-04-21 09:42:09 -07:00
xushaodong
1614c5ea64 supports wasm fetch credentials 2021-04-06 12:42:05 -07: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
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
nickelc
afed48cafd Make multipart an optional feature (default off) (#1128) 2021-01-04 13:20:17 -08:00
Muhammad Hamza
5ee4fe5ab6 Fix documentation line in for wasm Response 2020-12-20 07:27:35 -08:00
Konrad Borowski
e7be3eda04 Make wasm-bindgen-test a dev dependency 2020-11-24 07:04:21 -08:00
stevelr
4fe07d81cf add ClientBuilder.default_headers() for wasm32 target (#1084) 2020-11-16 13:09:47 -08:00
stevelr
045d7c7d2f Support Cloudflare workers runtime (#1081) 2020-11-11 10:10:01 -08:00
Jason van den Hurk
53268f2443 Introduce build method on WASM RequestBuilder for compatibility with async_impl (#1019) 2020-08-28 10:12:58 -07:00
Jonas Platte
d42385e7f2 wasm: Omit request body if it's empty (#1012)
This should allow creating GET and HEAD requests from http::Request
2020-08-20 15:42:48 -07:00
Jonas Platte
dd8441fd23 wasm: impl TryFrom<HttpRequest<T>> for Request (#997) 2020-08-08 15:29:22 -07:00
SnejUgal
ecc863fdac Do not assume that window exists in WASM (#990) 2020-08-06 15:09:31 -07:00
Jason van den Hurk
83fa93ccaf Make headers method on WASM client for compatibility with async_impl (#991)
The replace_headers method had to be moved since the async_impl module
is not compiled while compiling to wasm. This caused the replace_headers
method to be unavailable. fast_random had to be excluded from the wasm
build to prevent dead code warnings in the wasm target.
2020-08-06 15:07:43 -07:00
Jason van den Hurk
77d7e452e1 Make execute method on WASM client for compatibility with async_impl (#989)
The async_impl of reqwest has a `execute` impl on Client which is used
to execute a request and return a Result Future. When converting a crate
from async to wasm this method is missing, requiring forking and
rewriting the crate. By introducing this method less errors will be
introduced when trying to compile to wasm
2020-08-06 10:37:05 -07:00
Enno Boland
a800202384 Add multipart for WASM (#966) 2020-07-08 13:10:23 -07:00
Enno Boland
af9fc5c9d8 Implement Request::bearer_auth for wasm32 2020-07-06 15:00:54 -07:00
alianse777
71386d8734 Implement form() and query() for RequestBuilder [WASM] (#947) 2020-06-15 07:28:51 -07:00
Héctor Ramón
63376de793 Implement Response::content_length for wasm32 (#863) 2020-05-21 10:46:56 -07:00
Paolo Barbolini
d4a88a8d35 Implement RequestBuilder::json for wasm32 target (#812) 2020-02-20 10:22:03 -08:00
Paolo Barbolini
7214e123c4 Implement Default for Client and ClientBuilder on the wasm32 target (#813) 2020-02-20 08:44:19 -08:00
Héctor Ramón
f6ff7f4364 Implement Response::json for wasm32 target (#802) 2020-02-06 10:39:57 -08:00
Paolo Barbolini
1478313756 wasm: add error_for_status to wasm response (#779)
Adds the error_for_status and error_for_status_ref functions
to wasm::Response
2020-01-09 17:06:56 -08:00
Paolo Barbolini
fd88e0c648 wasm: add url function to wasm response (#777)
Adds the url function to wasm::Response
2020-01-09 13:43:08 -08:00
rhysd
6004623784 Add RequestBuilder::fetch_mode_no_cors() 2020-01-08 11:47:47 -08:00
Gleb Pomykalov
0f32c4a01a Update to hyper 0.13 2019-12-10 16:24:05 -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
Paolo Barbolini
dd65fc7c3a wasm: translate over response headers (#689)
Closes #656
2019-10-21 13:55:42 -07:00
lzutao
5e5e6e9040 chore(deps): bump wasm-bindgen-futures (#675) 2019-10-14 11:25:17 -07:00
Sean McArthur
932defd879 Introduce unstable, incomplete WASM support 2019-09-26 10:01:08 -07:00