Commit Graph

27 Commits

Author SHA1 Message Date
Yash Srivastav
12cfbafc28 Add support for getting HTTP version of a response 2018-07-31 13:53:42 -07:00
Yash Srivastav
c417d6dab8 Upgrade hyper to 0.12
Closes #304
2018-07-05 10:03:31 -07:00
Sean McArthur
cf5deac02d document that Response::text consumes the body
Closes #302
2018-05-31 12:02:06 -07:00
messense
0203fad886 Detect encoding in Response::text() (#256)
* Detect encoding and decode text response

Fixes #246

* Try to get encoding from Content-Type header

* Remove uchardet encoding detection for now

* Add non utf-8 test case for Response::text()

* Reduce copies
2018-02-15 11:01:57 -08:00
knight42
2c60511bce fix(response): copy_to() and text() return reqwest::Result 2017-10-27 15:10:31 +08:00
knight42
2fbc20167d feat: add Response::text() 2017-10-27 14:58:16 +08:00
knight42
c0896f1986 Add Response::copy_to 2017-10-18 09:21:36 +08:00
Sean McArthur
779f8080ef change Builders to only error at the end
Closes #189
2017-08-31 18:10:45 -07:00
Ashley Mannix
2cb70c872a make body return borrowed decoder 2017-08-19 18:02:20 +10:00
Ashley Mannix
e2fa97254e support async gzip decoding 2017-08-18 19:43:06 +10:00
Sean McArthur
12ee6fbcde small improvements to docs 2017-07-13 12:17:38 -07:00
Tom Prince
855e6615eb Add error_for_status.
This makes it it easy to turn error responses into error
results.
2017-06-22 11:03:39 -07:00
Sean McArthur
665b4fe718 upgrade hyper to v0.11 2017-06-21 09:47:21 -07:00
James Kominick
3de6f24785 Response doc improvements
- Add doc examples for the usage of `Response`s `url`, `status`,
  and `headers` methods
2017-06-08 23:28:35 -04:00
Sean McArthur
cb9a45b8a4 change Response::status() to return StatusCode by value 2017-06-07 18:11:05 -07:00
Michal Budzynski
e3bf6756f4 Added missing "Errors" and "Panics" sections to request.rs and response.rs 2017-06-04 04:49:33 +02:00
Sean McArthur
7fc47fb908 remove all public mention of HttpVersion
Closes #123
2017-06-01 17:02:59 -07:00
Tom Prince
a2c24a4009 Some slightly less trivial rustfmt changes. 2017-05-31 14:50:32 -06:00
Tom Prince
4c60e6d35f Really trivial rustfmt changes. 2017-05-31 14:50:32 -06:00
James Kominick
812c220e61 update doc examples
- Make examples runnable for doc tests
- Add error handling using `?` instead of `unwrap`
2017-05-21 17:14:32 -04:00
Corey Farwell
c367a7034f Add full example for Response::json. 2017-05-12 00:04:17 -04:00
Sean McArthur
f6109840f1 some info! logs for Request and Response 2017-05-09 15:30:29 -07:00
Ted Driggs
5947578a28 Change trait to DeserializeOwned 2017-05-09 13:42:50 -07:00
Sean McArthur
d514d4e6e8 redirect and error reform
- `Error` has been made an opaque struct.
- `RedirectPolicy` now makes use of `RedirectAttempt` and `RedirectAction`.
2017-05-08 11:38:48 -07:00
Sean McArthur
3cc4d654a3 fix panic from Gzip reading an empty stream
Closes #82
2017-05-05 11:50:07 -07:00
Cyril Plisko
44c7ccb46d Expose the final response URL 2017-04-07 17:40:55 +03:00
Sean McArthur
4d68979523 move Response pieces into its own response module 2017-04-05 16:48:32 -07:00