diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a081bd37..8bbc47ce 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,7 +19,7 @@ jobs: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] rust: [nightly] - backend: [curl-client, h1-client, hyper-client] + backend: [curl-client, 'h1-client native-tls', hyper-client] steps: - uses: actions/checkout@master diff --git a/Cargo.toml b/Cargo.toml index 42d9f77f..f86cdc2d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,6 +24,8 @@ curl-client = ["http-client/curl_client", "once_cell", "default-client"] h1-client = ["http-client/h1_client", "default-client"] hyper-client = ["http-client/hyper_client", "once_cell", "default-client", "async-std/tokio02"] wasm-client = ["http-client/wasm_client", "default-client"] +native-tls = ["http-client/native-tls"] +rustls = ["http-client/rustls"] default-client = [] middleware-logger = [] # requires web-sys for TextDecoder on wasm @@ -35,7 +37,7 @@ log = { version = "0.4.7", features = ["kv_unstable"] } mime_guess = "2.0.3" serde = "1.0.97" serde_json = "1.0.40" -http-client = { version = "6.1.0", default-features = false } +http-client = { version = "6.3.1", default-features = false } http-types = "2.5.0" async-std = { version = "1.6.0", default-features = false, features = ["std"] } async-trait = "0.1.36" diff --git a/src/lib.rs b/src/lib.rs index dc3505a2..f8a32fa7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,9 +65,11 @@ //! The following features are available. The default features are //! `curl-client`, `middleware-logger`, and `encoding` //! - __`curl-client` (default):__ use `curl` (through `isahc`) as the HTTP backend. -//! - __`h1-client`:__ use `async-h1` as the HTTP backend. +//! - __`h1-client`:__ use `async-h1` as the HTTP backend. For HTTPS, you also need either `native-tls` (to use OpenSSL) or either `rustls`. //! - __`hyper-client`:__ use `hyper` (hyper.rs) as the HTTP backend. //! - __`wasm-client`:__ use `window.fetch` as the HTTP backend. +//! - __`native-tls`:__ use OpenSSL for HTTPS (currently only usefull in addition of `h1-client`). +//! - __`rustls`:__ use rustls for HTTPS (currently only usefull in addition of `h1-client`). //! - __`middleware-logger` (default):__ enables logging requests and responses using a middleware. //! - __`encoding` (default):__ enables support for body encodings other than utf-8