Skip to content

Commit

Permalink
2.3.1
Browse files Browse the repository at this point in the history
## [2.3.1] - 2021-08-23

Fixed git base of 2.3.0

## [2.3.0] - 2021-08-23

(Yanked, faulty git base)

### Additions
- `surf::Config`, a way to configure `surf::Client`-s!
    - `Config::add_header()` - client-wide headers
    - `Config::set_base_url()` - client-wide base url
    - `Config::set_http_keep_alive()`
    - `Config::set_tcp_no_delay()`
    - `Config::set_timeout()` - per-request timeout.
    - `Config::set_max_connections_per_host()`
    - `Config::set_tls_config()` - only available on `h1-client` or `h1-client-rustls`.
    - More config may be available from the underlying [`http_client::Config`](https://docs.rs/http-client/6/http_client/struct.Config.html).
    - Easily turns into a `Client` via `std::convert::TryInto`.
- Extra `RequestBuilder` helpers for setting the body from different sources.
    - `body_json()`, `body_string()`, `body_bytes()`, `body_file()`.
- `Client::request()` for making arbitrary HTTP-method requests from a client.

### Improvements
- The `h1-client` backend now uses a shared client for 'one-off' style (`surf::get()`, etc) requests.
    - The `curl-client` and `hyper-client` backends already did this.
- The `wasm-client` feature now pulls in `getrandom`'s `"js"` feature.
    - This isn't a problem since the wasm client only works in a web/emscripten environment anyways.

### Deprecations
- `Client::set_base_url` has been deprecated in favor of `Config`.

### Docs
- Several docs fixes
- Minor 'branding' changes
  • Loading branch information
Fishrock123 committed Aug 23, 2021
1 parent 9a0735e commit dedb6f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,14 @@ and this project adheres to [Semantic Versioning](https://book.async.rs/overview

## [Unreleased]

## [2.3.1] - 2021-08-23

Fixed git base of 2.3.0

## [2.3.0] - 2021-08-23

(Yanked, faulty git base)

### Additions
- `surf::Config`, a way to configure `surf::Client`-s!
- `Config::add_header()` - client-wide headers
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "surf"
version = "2.3.0"
version = "2.3.1"
license = "MIT OR Apache-2.0"
repository = "https://github.com/http-rs/surf"
documentation = "https://docs.rs/surf"
Expand Down

0 comments on commit dedb6f4

Please sign in to comment.