Martin Algesten
1e93f17a58
fix test problem
2020-05-20 21:22:35 +02:00
Paolo Barbolini
4e744f87c1
Keep the old Response::into_json around and call this Response::into_json_deserialize
2020-05-06 13:47:37 +02:00
Paolo Barbolini
0b69c595b6
Make Response::into_json deserialize into a serde DeserializeOwned
...
This removes the necessity to take the result of Response::into_json and
having to convert it into a struct by using serde_json::from_value
This adds no new dependencies since serde_json already depends on serde.
Users of ureq will have to include `serde_derive` either by importing it
directly or by using serde with the `derive` feature, unless they want to
manually implement `Deserialize` on their structs.
2020-05-06 13:47:37 +02:00
Rob Young
28bdb89175
Set a default content type for JSON requests
...
When sending a JSON request a Content-Type of application/json is
usually wanted. This is often set as a default for JSON methods by HTTP
clients so can be confusing when it is not set. However, we do not want
to prevent the user from setting their own Content-Type.
2020-02-06 07:57:00 +01:00
Tom Forbes
594340a096
Fix compilation errors with the cookies feature ( #22 )
...
* Fix compilation errors with the cookies feature
2019-10-30 11:51:06 +01:00
Martin Algesten
753d61b454
Retry some pooled connections failing when server closes. Close #10
...
This is not a perfect solution. It works as long as we are not sending
any body bytes. We discover the error first when attempting to read
the response status line. That means we discover the error after
sending body bytes. To be able to re-send the body, we would need to
introduce a buffer to be able to replay the body on the next
request. We don't currently do that.
2019-10-20 21:36:38 +02:00
Martin Algesten
999653e7f3
handle header with spaces before value
2019-10-20 10:58:16 +02:00
Martin Algesten
ed999b579d
Removing AsciiString dep and one unsafe
...
This library is not about enforcing standards, so the internal use of
AsciiString for headers and status lines is not necessary.
2019-10-20 10:40:30 +02:00
Chris West (Faux)
a97dfcb408
fix warnings
2019-09-09 19:54:45 +01:00
Martin Algesten
9d069b60b4
fix tests
2019-06-21 15:53:23 +02:00
Martin Algesten
41b21d37e4
fix clippy warnings
2019-06-21 15:09:36 +02:00
Chris West (Faux)
ceb7c3ac14
use pub(crate) instead of include!()
2019-05-27 17:44:14 +01:00
Martin Algesten
d4d68ae585
fix parse error when no status text. close #4
2019-03-30 11:29:53 +01:00
Martin Algesten
22e83fc31c
fixes for no-default-features
2019-02-03 12:05:27 +05:30
Martin Algesten
cb3d6e8124
resolved url in response
2018-12-20 11:08:39 +01:00
Martin Algesten
07fd4d2cd5
pub(crate) where we can
2018-12-20 11:08:20 +01:00
Martin Algesten
1519dcb0b1
fix redirect logic
2018-12-20 10:54:47 +01:00
Martin Algesten
131476bd1a
remove extern crate
2018-12-18 13:45:13 +01:00
Martin Algesten
4151aab3b4
redirects 0
2018-12-18 13:34:05 +01:00
Martin Algesten
5ba6b3cd4d
edition 2018, clippy, fmt
2018-12-18 13:17:19 +01:00
Martin Algesten
8b2d4c0545
test bad headers
2018-07-02 09:23:30 +02:00
Martin Algesten
8decd8e489
auth url test
2018-07-01 18:40:49 +02:00
Martin Algesten
2d2daf58ba
doc
2018-07-01 11:13:21 +02:00
Martin Algesten
a14e75fcbc
dont require agent().build()
2018-07-01 10:24:42 +02:00
Martin Algesten
567a19a656
resp.status() return u16
2018-07-01 09:04:50 +02:00
Martin Algesten
548b5d80c2
test poolable against s3
2018-06-30 23:05:40 +02:00
Martin Algesten
651c1102c9
better test
2018-06-30 19:30:32 +02:00
Martin Algesten
4a5944443f
connection pooling
2018-06-30 16:52:54 +02:00
Martin Algesten
0e4c326caf
tidy
2018-06-30 14:01:13 +02:00
Martin Algesten
ff582b8c6f
separate out stream
2018-06-30 13:47:37 +02:00
Martin Algesten
b54f747d16
separate out response
2018-06-30 13:36:41 +02:00
Martin Algesten
f5a4c83819
refactor into unit
2018-06-30 13:05:36 +02:00
Martin Algesten
df83478d48
no body on HEAD request
2018-06-28 10:56:43 +02:00
Martin Algesten
c5c878caca
better debug formatting of requests
2018-06-22 16:01:51 +02:00
Martin Algesten
919eab2f12
fix bug in combining query strings
2018-06-22 16:00:18 +02:00
Martin Algesten
cd4a1722fa
reduce dependency tree by features
2018-06-22 15:02:13 +02:00
Martin Algesten
e9ccf1c2cc
use charset encoding for send_string
2018-06-22 11:38:44 +02:00
Martin Algesten
28348f1e51
shorter doc examples
2018-06-22 10:57:29 +02:00
Martin Algesten
0a828bb4a5
cargo fmt
2018-06-22 10:16:37 +02:00
Martin Algesten
5f975270bf
send_str to send_string
2018-06-22 10:13:31 +02:00
Martin Algesten
293733643c
range test
2018-06-22 10:07:29 +02:00
Martin Algesten
b860a3c146
query string in path
2018-06-17 10:13:36 +02:00
Martin Algesten
9514bd2743
query string test
2018-06-17 00:25:40 +02:00
Martin Algesten
6b63aab605
tests
2018-06-16 12:43:37 +02:00
Martin Algesten
7e3ad42674
content length
2018-06-16 12:35:51 +02:00
Martin Algesten
4791db3a63
more doc
2018-06-16 11:01:28 +02:00
Martin Algesten
f4f50f04d7
hellow_worls.json
2018-06-14 20:20:29 +02:00
Martin Algesten
75c8a9bbde
vecread -> cursor
2018-06-14 15:17:40 +02:00
Martin Algesten
7177a99d1f
move connect calls to stream
2018-06-14 14:38:00 +02:00
Martin Algesten
d4126027c8
cookie jar
2018-06-12 23:09:17 +02:00