### 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.
## [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
## [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
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.
This PR is a follow-up of http-rs/http-client#53 and addresses #40.
It adds a `h1-client-rustls` feature using `http-client/rustls` feature introduced by http-rs/http-client#53.
Co-Authored-By: Julien Enoch <julien.enoch@adlinktech.com>