Sean McArthur
12ee6fbcde
small improvements to docs
2017-07-13 12:17:38 -07:00
Sean McArthur
6cdaff4b66
add a Proxy type
...
Proxies can currently be configured to intercept HTTP, HTTPS, and all
requests. HTTPS tunneling is supported.
Closes #30
2017-06-22 09:49:00 -07:00
Sean McArthur
665b4fe718
upgrade hyper to v0.11
2017-06-21 09:47:21 -07:00
Sean McArthur
e45f234b4a
fix socket_is_dead on windows
2017-06-07 17:02:15 -07:00
Sean McArthur
00382f8d06
use a stale check in the pool
...
Check that a socket is not EOF to reduce the likelihood of using
a bad pooled connection.
2017-06-06 13:31:28 -07:00
Michal Budzynski
026dca2512
Added missing "Errors" sections to client.rs and lib.rs
2017-06-04 04:48:13 +02:00
Sean McArthur
e176dcebca
convert RequestBuilder to a &mut Self builder
...
Closes #108
2017-06-01 16:23:16 -07:00
Tom Prince
a36ed4a87a
Add a conversion from native_tls::Error.
2017-05-31 19:27:45 -06:00
Sean McArthur
8d784faa98
move all configuration from Client to ClientBuilder
2017-05-31 18:14:47 -07:00
Corentin Henry
0f0bf882d9
add an error section to RequestBuilder.json
2017-05-31 17:50:20 -07:00
Corentin Henry
20f2896ab4
tweak add_json_fail test
2017-05-31 17:41:48 -07:00
Corentin Henry
80a80379d3
update json tests
2017-05-31 16:42:44 -07:00
Corentin Henry
2f1b3b352b
handle json serialization errors
...
fixes https://github.com/seanmonstar/reqwest/issues/112
2017-05-31 16:41:45 -07:00
Sean McArthur
7565179a1c
add Request.method_mut, remove set_*
2017-05-31 16:11:23 -07:00
theduke
e9f464aa7e
Add a Request type and refactor execution.
...
A Request can be obtained with RequestBuilder::build(), and executed
with Client::execute().
The RequestBuilder now also builds a Request and forwards it to the
inner client.
The execution logic was moved from Requestbuilder::send() to
ClientRef::execute_request().
2017-05-31 16:06:07 -07:00
Tom Prince
9d6f487646
Use block-style for try_!.
2017-05-31 15:00:12 -06: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
Tom Prince
427602fb08
Move constraint into where clause.
2017-05-31 14:21:16 -06:00
Sean McArthur
82a6eb4939
update ClientBuilder to match builder pattern
2017-05-31 11:38:02 -07:00
Corentin Henry
4b2eda7d29
add custom certificates & disabling hostname verif
2017-05-31 11:38:02 -07:00
Sean McArthur
001528b029
Merge pull request #100 from theduke/improve-basic-auth
...
Improve type signature of RequestBuilder::basic_auth().
2017-05-26 13:56:55 -07:00
theduke
60295dd0fc
Improve type signature of RequestBuilder::basic_auth().
...
Use Into<String> for both arguments to make the API more convenient.
2017-05-23 23:59:53 +02: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
Sean McArthur
32907dc100
touch up Client doc example
2017-05-18 14:35:22 -07:00
Sean McArthur
dfaf25d1cb
add defaults to docs about gzip and redirect
2017-05-18 11:29:32 -07:00
Sean McArthur
d8696045b4
referer updates
...
- Don't set Referer if going from https to http
- Explicitly remove username, password, and fragment from Referer
2017-05-18 11:26:28 -07:00
Sean McArthur
e00a64aa18
make sensitive header check include port
...
- adjusts to use &mut Headers
- add integration test
2017-05-18 10:58:41 -07:00
Steve Robinson
21a28dffd1
Filters sensitive headers when redirecting to a Location of different host than of the Referrer
...
Removes Cookie, Authorization and WWW-Authenticate cookies.
Resolves #10
2017-05-18 10:57:10 -07:00
Sean McArthur
bafcd7ae6f
add a referer() option to disable setting Referer header on redirects
2017-05-18 10:56:39 -07:00
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
f6109840f1
some info! logs for Request and Response
2017-05-09 15:30:29 -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
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
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
Steven Fackler
fa4df2037a
Use external hyper-native-tls crate
2017-01-21 12:50:54 +00: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