Skip to content

Latest commit

 

History

History
100 lines (79 loc) · 3.32 KB

README.md

File metadata and controls

100 lines (79 loc) · 3.32 KB

http-client

Types and traits for http clients.

Note on intent

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.

Safety

For non-wasm clients, this crate uses #![deny(unsafe_code)] to ensure everything is implemented in 100% Safe Rust.

Feature Flags

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 the h1-client feature.
  • hyper version 0.14.x via the hyper0_14-client feature.
  • libcurl through isahc version 0.9.x via the isahc0_9-client feature.
  • WASM to JavaScript fetch via the wasm-client feature.

Additionally TLS support can be enabled by the following options:

  • h1-rustls uses rustls for the h1-client.
  • h1-native-tls uses OpenSSL for the h1-client (not recommended, no automated testing).
  • hyper0_14-rustls uses rustls for the hyper0-14-client.
  • hyper0_14-native-tls uses OpenSSL for the hyper0_14-client (not recommended, no automated testing).
  • isahc0_9-client (implicit support).
  • wasm-client (implicit support).

Contributing

Want to join us? Check out our "Contributing" guide and take a look at some of these issues:

License

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.