Types and traits for http clients.
This crate is designed to support developer-facing clients instead of being used directly.
If you are looking for a Rust HTTP Client library which can support multiple backend http implementations, consider using Surf, which depends on this library and provides a good developer experience.
For non-wasm clients, this crate uses #![deny(unsafe_code)]
to ensure everything is implemented in
100% Safe Rust.
This crate does not work without specifying feature flags. No features are set by default.
The following client backends are supported:
async-h1
version 1.x, via theh1-client
feature.hyper
version 0.14.x via thehyper0_14-client
feature.- libcurl through
isahc
version 0.9.x via theisahc0_9-client
feature. - WASM to JavaScript
fetch
via thewasm-client
feature.
Additionally TLS support can be enabled by the following options:
h1-rustls
usesrustls
for theh1-client
.h1-native-tls
uses OpenSSL for theh1-client
(not recommended, no automated testing).hyper0_14-rustls
usesrustls
for thehyper0-14-client
.hyper0_14-native-tls
uses OpenSSL for thehyper0_14-client
(not recommended, no automated testing).isahc0_9-client
(implicit support).wasm-client
(implicit support).
Want to join us? Check out our "Contributing" guide and take a look at some of these issues:
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.