v0.9.0
This commit is contained in:
109
CHANGELOG.md
109
CHANGELOG.md
@@ -1,3 +1,112 @@
|
|||||||
|
# v0.9.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Upgrade to `tokio` 0.1.
|
||||||
|
- Upgrade to `hyper` 0.12.
|
||||||
|
- Upgrade to `native-tls` 0.2.
|
||||||
|
- Add `ClientBuilder::danger_accept_invalid_certs(bool)` to disable
|
||||||
|
certificate verification.
|
||||||
|
- Add `RequestBuilder::bearer_auth(token)` to ease sending bearer tokens.
|
||||||
|
- Add `headers()` and `headers_mut()` to `multipart::Part` to allow sending
|
||||||
|
extra headers for a specific part.
|
||||||
|
- Moved `request::unstable::async` to `reqwest::async`.
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Fix panicking when passing a `Url` with a `file://` scheme. Instead, an
|
||||||
|
`Error` is returned.
|
||||||
|
|
||||||
|
### Breaking Changes
|
||||||
|
|
||||||
|
- Changed `ClientBuilder::danger_disable_hostname_verification()`
|
||||||
|
to `ClientBuilder::danger_accept_invalid_hostnames(bool)`.
|
||||||
|
- Changed `ClientBuilder` to be a by-value builder instead of by-ref.
|
||||||
|
|
||||||
|
For single chains of method calls, this shouldn't affect you. For code that
|
||||||
|
conditionally uses the builder, this kind of change is needed:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
// Old
|
||||||
|
let mut builder = ClientBuilder::new();
|
||||||
|
if some_val {
|
||||||
|
builder.gzip(false);
|
||||||
|
}
|
||||||
|
let client = builder.build()?;
|
||||||
|
|
||||||
|
// New
|
||||||
|
let mut builder = ClientBuilder::new();
|
||||||
|
if some_val {
|
||||||
|
builder = builder.gzip(false);
|
||||||
|
}
|
||||||
|
let client = builder.build()?;
|
||||||
|
```
|
||||||
|
- Changed `RequestBuilder` to be a by-value builder of by-ref.
|
||||||
|
|
||||||
|
See the previous note about `ClientBuilder` for affected code and
|
||||||
|
how to change it.
|
||||||
|
- Removed the `unstable` cargo-feature, and moved `reqwest::unstable::async`
|
||||||
|
to `reqwest::async`.
|
||||||
|
- Changed `multipart::Part::mime()` to `mime_str()`.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
// Old
|
||||||
|
let part = multipart::Part::file(path)?
|
||||||
|
.mime(mime::TEXT_PLAIN);
|
||||||
|
|
||||||
|
// New
|
||||||
|
let part = multipart::Part::file(path)?
|
||||||
|
.mime_str("text/plain")?;
|
||||||
|
```
|
||||||
|
- The upgrade to `hyper` 0.12 means a temporary removal of the typed headers.
|
||||||
|
|
||||||
|
The `RequestBuilder` has simple methods to set headers using strings, which
|
||||||
|
can work in most places.
|
||||||
|
|
||||||
|
```rust
|
||||||
|
// Old
|
||||||
|
client
|
||||||
|
.get("https://hyper.rs")
|
||||||
|
.header(UserAgent::new("hallo"))
|
||||||
|
.send()?;
|
||||||
|
|
||||||
|
// New
|
||||||
|
client
|
||||||
|
.get("https://hyper.rs")
|
||||||
|
.header("user-agent", "hallo")
|
||||||
|
.send()?;
|
||||||
|
```
|
||||||
|
|
||||||
|
To ease the transition, there is a `hyper-011` cargo-feature that can be
|
||||||
|
enabled.
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
reqwest = { version = "0.9", features = ["hyper-011"] }
|
||||||
|
```
|
||||||
|
|
||||||
|
And then usage:
|
||||||
|
|
||||||
|
```rust
|
||||||
|
client
|
||||||
|
.get("https://hyper.rs")
|
||||||
|
.header_011(reqwest::hyper_011::header::UserAgent::new("hallo"))
|
||||||
|
.send()?;
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## v0.8.8
|
||||||
|
|
||||||
|
- Fix docs.rs/reqwest build.
|
||||||
|
|
||||||
|
## v0.8.7
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Send an extra CRLF at the end of multipart requests, since some servers expect it.
|
||||||
|
- Removed internal dependency on `tokio-proto`, which removed unsafe `small-vec`
|
||||||
|
dependency.
|
||||||
|
|
||||||
## v0.8.6
|
## v0.8.6
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.9.0-pre" # remember to update html_root_url
|
version = "0.9.0" # remember to update html_root_url
|
||||||
description = "higher level HTTP client library"
|
description = "higher level HTTP client library"
|
||||||
keywords = ["http", "request", "client"]
|
keywords = ["http", "request", "client"]
|
||||||
repository = "https://github.com/seanmonstar/reqwest"
|
repository = "https://github.com/seanmonstar/reqwest"
|
||||||
@@ -9,8 +9,6 @@ authors = ["Sean McArthur <sean@seanmonstar.com>"]
|
|||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
categories = ["web-programming::http-client"]
|
categories = ["web-programming::http-client"]
|
||||||
|
|
||||||
publish = false # pre
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
base64 = "0.9"
|
base64 = "0.9"
|
||||||
bytes = "0.4"
|
bytes = "0.4"
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#![deny(warnings)]
|
|
||||||
#![deny(missing_docs)]
|
#![deny(missing_docs)]
|
||||||
#![deny(missing_debug_implementations)]
|
#![deny(missing_debug_implementations)]
|
||||||
|
#![cfg_attr(test, deny(warnings))]
|
||||||
#![cfg_attr(docs_rs_workaround, feature(extern_prelude))]
|
#![cfg_attr(docs_rs_workaround, feature(extern_prelude))]
|
||||||
#![doc(html_root_url = "https://docs.rs/reqwest/0.8.6")]
|
#![doc(html_root_url = "https://docs.rs/reqwest/0.9.0")]
|
||||||
|
|
||||||
//! # reqwest
|
//! # reqwest
|
||||||
//!
|
//!
|
||||||
|
|||||||
Reference in New Issue
Block a user