Commit Graph

57 Commits

Author SHA1 Message Date
Raphaël Huchet
6a95a7e19e Update client.rs 2017-05-15 23:37:31 +02:00
Raphaël Huchet
0b5ba9aaa7 Add tiny example to Client 2017-05-15 16:01:24 +02:00
Sean McArthur
b1f40b776d add Error::get_ref method with 'static bound 2017-05-12 22:03:24 -07: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
be1b1f0ab8 Merge pull request #88 from seanmonstar/error-reform
redirect and error reform
2017-05-09 13:36:48 -07:00
theduke
ad31cbc76c Added basic_auth helper on RequestBuilder 2017-05-08 23:49:12 +02: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
b5475f6903 tidy up some clippy warnings 2017-05-05 14:13:54 -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
Sean McArthur
517e8f0aa5 implement Clone for Client 2017-04-05 11:22:19 -07:00
Sean McArthur
d87e7ca4e9 Merge pull request #68 from rylio/master
Modify Content-Encoding, Content-Length, and Accept-Encoding for gzip
2017-03-14 14:50:48 -07:00
Garrett Squire
ec049fefba add a timeout option for read and write operations on a client 2017-03-13 22:07:55 -07:00
Ryan Coffman
e557fe155d Remove content-encoding and content-length headers from response, if we ungzip the response,
and add accept-encoding: gzip header to the reqeuest when ungzipping is enabled
2017-03-13 16:39:11 -07:00
Corentin Henry
4d6582d22b add method for PATCH requests 2017-03-12 15:23:23 -07:00
Ryan Coffman
559ecfab45 Check for gzip in transfer-encoding header also. 2017-03-12 00:40:56 -08:00
Jason Schein
ab5e477a12 Add (configurable) automatic gzip decompression. 2017-02-26 20:08:55 -08:00
Eric Kidd
82f1877d4b Implement Body::sized
This is necessary for APIs such as BigML's, where we may need to send
extremely large request bodies, but chunked transfer encoding is not
supported.

This is a partial fix for seanmonstar/reqwest#49.
2017-02-17 07:04:10 -05:00
Marc-Antoine Perennou
a3983f3122 client: add convenience method for DELETE
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-02-08 14:37:54 +01:00
unaffiliated
c37b8aa033 added in PUT functionality 2017-02-04 00:57:45 -08:00
Sean McArthur
69cdfcb763 Merge pull request #46 from sebasgarcep/master
Re-export Mime
2017-02-02 11:29:49 -08:00
Brandon W Maister
c5e955b681 Add some examples of reading the content of a Response, and a paragraph about Read 2017-02-02 11:29:37 -08:00
Steven Fackler
fa4df2037a Use external hyper-native-tls crate 2017-01-21 12:50:54 +00:00
Sebastian Garrido
0615c6d65e Re-export Mime 2017-01-14 11:54:31 -05:00
Saghm Rossi
b058a5d235 export hyper::Error for use in custom types implementing Header 2017-01-02 16:12:20 -05:00
Jan-Erik Rediger
8487bf3418 Fix typo in documentation 2016-12-15 09:52:33 +01:00
Sean McArthur
7c2e163333 remove (todo redirect policy) from docs 2016-12-12 10:36:20 -08:00
Sean McArthur
4527a53181 remove Clone impl from Client 2016-12-12 10:31:20 -08:00
Sean McArthur
559ae8011a add header if no Accept is set 2016-12-12 10:29:14 -08:00
Sean McArthur
e92b3e862a add support for defining RedirectPolicy for a Client 2016-12-10 11:36:22 -08:00
Sean McArthur
d18a53b3fc make Client: Send + Sync, RequestBuilder: Send, Response: Send 2016-12-02 15:36:33 -08:00
Sean McArthur
dbfaf9c842 add a note to about redirects 2016-11-29 10:14:21 -08:00
Sean McArthur
3544e48e8e dont try to redirect if post body cannot be reset 2016-11-28 11:36:42 -08:00
Aidan Hobson Sayers
a54447c1d9 Add handling of 307 and 308 redirects
Fixes #9
2016-11-28 11:06:42 -08:00
Sean McArthur
20b161096e update Error to implement Send
BREAKING CHANGE: This does change the type of `Error::Serialize`, but
  should only possibly affect those constructing `Error`, not consuming it.
2016-11-21 14:43:28 -08:00
Sean McArthur
a580af2a22 move Read impl of Body to private function 2016-11-21 11:47:07 -08:00
Sean McArthur
85c8c7bd64 Merge pull request #19 from gsquire/response-json
JSON Response reader
2016-11-21 11:03:11 -08:00
Michael Bryan
59ba7cf23b test: Fixed up issue with reading a Body and finished RequestBuilder tests 2016-11-21 11:45:05 +08:00
Garrett Squire
2d10ecc99e add the ability to deserialize JSON from a response body directly 2016-11-20 13:11:11 -08:00
Michael Bryan
980488f918 test: Added some trivial tests for the RequestBuilder 2016-11-20 22:26:27 +08:00
Sebastian Dröge
d624b0ef29 Implement std::fmt::Debug for all public types 2016-11-14 20:54:18 +02:00
Sean McArthur
4f9e39829c a few fixes 2016-11-08 18:56:49 -08:00
Sean McArthur
fb3c229483 add 303 status code to redirect policy 2016-11-08 13:35:18 -08:00
Sean McArthur
5739bd3050 Merge branch 'form' 2016-11-08 13:33:26 -08:00
Sean McArthur
06f94f4744 add form() method 2016-11-08 13:33:08 -08:00
Sean McArthur
0027d9c288 Merge pull request #8 from anowell/native-tls-update
Update to reflect latest native-tls API
2016-11-08 10:51:39 -08:00
Anthony Nowell
92825974b0 Update to reflect latest native-tls API 2016-11-08 02:57:08 -07:00