Skip to content

Tags: http-rs/surf

Tags

v2.3.2

Toggle v2.3.2's commit message
2.3.2

### Fixes
- Fixed `Config::set_tls_config()` when using `h1-client` (`async-h1` with `async-native-tls`).
    - Previously this function was never exposed due to a faulty feature flag check.

v2.3.1

Toggle v2.3.1's commit message
2.3.1

## [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

v2.3.0

Toggle v2.3.0's commit message
2.3.0

## [2.3.0] - 2021-08-23

### 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

v2.2.0

Toggle v2.2.0's commit message
2.2.0

If you use the `h1-client`, upgrading to this release is recommended.

- `h1-client-rustls` feature flag, for using the [`async-h1`](https://github.com/http-rs/async-h1) client with [`rustls`](https://github.com/ctz/rustls) as the TLS backend.
    - The TLS backend for `h1-client` is still `async-native-tls`.
- Per-request middleware, provided by `RequestBuilder::middleware(&mut self, impl Middleware)`.
- `AsRef<Headers>` and `AsMut<Headers>` for `surf::Request` and `surf::Response`.

- Relative redirects should now be handled by the `RedirectMiddleware`.
- The `h1-client` feature should now properly work with `http-client` 6.3.0  without additional feature specification.

- The `http` docs now link to the live, up-to-date `http_types` docs.

- Various CI improvements.

v2.1.0

Toggle v2.1.0's commit message
2.1.0

This minor release contains follow-up fixes and improvements to Surf 2.0.

### Additions
- Added a `hyper-client` cargo feature for enabeling a hyper client backend via http-client.

### Fixes
- Fixed `base_url` not being propagated to the `Client` instance in middleware.

### Documentation
- Updated documentation for `set_base_url()`.

v2.0.0

Toggle v2.0.0's commit message
2.0.0

This major release of Surf contains substantial improvements through a variety of changes and additions.

(Note: this is a cumulative list of changes since Surf 1.0.3)

Notable mentions include:
- Uses stable standard library `futures`!
- Much more type compatibility with Tide via http-types!
- Re-usable `Client` which is able to make use of connection pooling under the hood.
- Reduced generics for `Client` and `Middleware`.
- Re-worked `Middleware` to use `async_trait`.

v2.0.0-alpha.7

Toggle v2.0.0-alpha.7's commit message
(cargo-release) surf version 2.0.0-alpha.7

v2.0.0-alpha.6

Toggle v2.0.0-alpha.6's commit message
2.0.0-alpha.6 actual: fixed maxed cargo keywords

oops.

v2.0.0-alpha.5

Toggle v2.0.0-alpha.5's commit message
2.0.0-alpha.5

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.