Update CHANGELOG, Cargo.toml, and docs for 2.0.

This commit is contained in:
Jacob Hoffman-Andrews
2020-11-22 11:09:32 -08:00
parent 1c41da87f0
commit cc7ce757bd
4 changed files with 38 additions and 5 deletions

View File

@@ -1,3 +1,28 @@
# 2.0.0
* Remove the "synthetic error" concept. Methods that formerly returned
Response now return Result<Response, Error>.
* Rewrite Error type. Instead of an enum, it's now a struct with an
ErrorKind. This allows us to store the source error when appropriate,
as well as the URL that caused an error.
* Move more configuration to Agent. Timeouts, TLS config, and proxy config
now require building an Agent.
* Create AgentBuilder to separate the process of building an agent from using
the resulting agent.
* Rewrite README and top-level documentation.
* Add ureq::request_url and Agent::request_url, to send requests with
already-parsed URLs.
* Remove native_tls support.
* Remove convenience methods `options(url)`, `trace(url)`, and `patch(url)`.
To send requests with those verbs use `request(method, url)`.
* Remove Agent::set_cookie.
* Remove Header from the public API. The type wasn't used by any public
methods.
* Remove into_json_deserialize. Now into_json handles both serde_json::Value
and other types that implement serde::Deserialize. If you were using
serde_json before, you will probably have to explicitly annotate a type,
like: `let v: serde_json::Value = response.into_json();`.
# 1.5.2
* Remove 'static constraint on Request.send(), allowing a wider variety of

View File

@@ -1,6 +1,6 @@
[package]
name = "ureq"
version = "1.5.2"
version = "2.0.0-rc1"
authors = ["Martin Algesten <martin@algesten.se>", "Jacob Hoffman-Andrews <ureq@hoffman-andrews.com>"]
description = "Simple, safe HTTP client"
license = "MIT/Apache-2.0"

View File

@@ -14,7 +14,11 @@ Ureq is in pure Rust for safety and ease of understanding. It avoids using
the API simple and and keeps dependencies to a minimum. For TLS, ureq uses
[rustls].
[blocking]: #blocking-i-o-for-simplicity
Version 2.0.0 was released recently and changed some APIs. See the [changelog] for details.
[blocking]: #blocking-io-for-simplicity
[changelog]: https://github.com/algesten/ureq/blob/master/CHANGELOG.md
### Usage
@@ -141,7 +145,7 @@ to encode the request body using that.
## Blocking I/O for simplicity
Rust supports [asynchronous (async) I/O][async], but ureq does not use it. Async I/O
Ureq uses blocking I/O rather than Rust's newer [asynchronous (async) I/O][async]. Async I/O
allows serving many concurrent requests without high costs in memory and OS threads. But
it comes at a cost in complexity. Async programs need to pull in a runtime (usually
[async-std] or [tokio]). They also need async variants of any method that might block, and of

View File

@@ -12,7 +12,11 @@
//! the API simple and and keeps dependencies to a minimum. For TLS, ureq uses
//! [rustls].
//!
//! [blocking]: #blocking-i-o-for-simplicity
//! Version 2.0.0 was released recently and changed some APIs. See the [changelog] for details.
//!
//! [blocking]: #blocking-io-for-simplicity
//! [changelog]: https://github.com/algesten/ureq/blob/master/CHANGELOG.md
//!
//!
//! ## Usage
//!
@@ -154,7 +158,7 @@
//!
//! # Blocking I/O for simplicity
//!
//! Rust supports [asynchronous (async) I/O][async], but ureq does not use it. Async I/O
//! Ureq uses blocking I/O rather than Rust's newer [asynchronous (async) I/O][async]. Async I/O
//! allows serving many concurrent requests without high costs in memory and OS threads. But
//! it comes at a cost in complexity. Async programs need to pull in a runtime (usually
//! [async-std] or [tokio]). They also need async variants of any method that might block, and of