3
3
This is not an exhaustive list of changes. Most tweaks to the API are clear by looking
4
4
at the docs. If anything is unclear, please open a PR and we can clarify further.
5
5
6
+ ## Rewrite
7
+
8
+ ureq 3.x is a ground up complete rewrite of ureq 2.x. The HTTP protocol is re-engineered
9
+ to a Sans-IO style implementation living in the ` ureq-proto ` crate. Both protocol and ureq
10
+ main crate remain ` #![forbid(unsafe_code)] ` .
11
+
12
+ The goals of the project remain largely the same: A simple, sync, HTTP/1.1 client with
13
+ a minimum number of dependencies.
14
+
15
+ With Sans-IO the user can now implement their own ` Transport ` thus providing alternative
16
+ TLS or non-socket based communication in crates mainitained outside the ureq project. The
17
+ same goes for ` Resolver ` .
18
+
6
19
## HTTP Crate
7
20
8
21
In 2.x ureq implemented it's own ` Request ` and ` Response ` structs. In 3.x, we
@@ -11,15 +24,6 @@ API and can be found as a dependency of a number of big [http-related crates] in
11
24
Rust ecosystem. The idea is that presenting a well-known API towards users of ureq
12
25
will make it easier to use.
13
26
14
- * .set -> .header
15
-
16
- ```
17
- // ureq2.x
18
- ureq::get("https://httpbin.org/get").set("foo", "bar").call();
19
- // ureq3.x
20
- ureq::get("https://httpbin.org/get").header("foo", "bar").call();
21
- ```
22
-
23
27
## Re-exported crates must be semver 1.x (stable)
24
28
25
29
ureq2.x re-exported a number of semver 0.x crates and thus suffered from that breaking
@@ -32,8 +36,6 @@ major version). In ureq 3.x we will strive to re-export as few crates as possibl
32
36
33
37
Instead we made our own TLS config and Cookie API, and drop the json macro.
34
38
35
-
36
-
37
39
## No retry idempotent
38
40
39
41
ureq 2.x did an automatic retry of idempotent methods (GET, HEAD). This was considered
0 commit comments