Commit Graph

13 Commits

Author SHA1 Message Date
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
David Pedersen
1c680005c2 Add blocking::Response::headers_mut (#958) 2020-06-24 07:19:15 -07:00
Konrad Gołuchowski
526afe9d86 Add bytes() function to blocking::Response 2020-03-03 14:06:15 -08:00
Sean McArthur
ae81a30cf7 Document serde dependency in JSON examples
Closes #818
2020-02-27 12:52:57 -08:00
Gleb Pomykalov
0f32c4a01a Update to hyper 0.13 2019-12-10 16:24:05 -08:00
lzutao
a9dd94a99f doc: make encoding_rs link clickable (#674) 2019-10-14 11:24:12 -07:00
Constantin Nickel
24394364eb Make json an optional feature (default off) 2019-09-27 12:27:23 -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
53495e1526 Redesign Error type
- The `Error`'s kind is a now a set of variants depending on the context
  of when an error could occur.
- If another error was the cause, it is now always the `source`.

Along with the `is_*` methods, this should help in understanding *when*
a certain error occurred. For example, an error setting the TLS
certificates will return a builder error, with the TLS error as the
source. This should help differentiate from a TLS error that happens
when connecting to a server.

It also makes the internal code less dependent on all the exact
dependencies that can be enabled or disabled.
2019-09-17 14:23:22 -07:00
Constantin Nickel
b1a90eb402 Prune the futures dependencies 2019-09-12 07:52:31 -07:00
Sean McArthur
5356776834 refine async API
- Converted `Response::text` and `Response::json` to `async fn`
- Added `Response::bytes` async fn as a counterpat to `text`.
- Added `Response::chunk` async fn to stream chunks of the response body.
- Added `From<Response> for Body` to allow piping a response as a request body.
- Removed `Decoder` from public API
- Removed body accessor methods from `Response`
- Removed `Chunk` type, replaced with `bytes::Bytes`.
- Removed public `impl Stream for Body`.
2019-09-10 14:06:09 -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