monoio-netreq
monoio-netreq is a user-friendly HTTP client library designed for use with the Monoio runtime.
It is built on top of monoio-transports and monoio-http.
Features
- Support for HTTP/1.1 and HTTP/2 protocols.
- TLS support with both
native-tlsandrustlsfor secure connections. - Connection pooling for efficient resource management.
- Optional feature for a Hyper-based client.
- Hyper client includes TLS support with both
native-tlsandrustls.
Feature Flags
This crate uses monoio-transports as a dependency, sourced from this forked repository. By default, the crate re-exports monoio-transports from crates.io. Below are the main feature flags available in this crate:
- default-crate: Enabled by default. Imports features from the
monoio-transportscrate available on crates.io. - pool: Uses features from the forked Git repository of
monoio-transports. Enable this flag if you want to customize pool options with the defaultHttpConnector. - hyper-tls: Disables the
io_uringfeatures of Monoio and enables thetokio-compatlegacy feature. Use this only if you need TLS support withHyperConnectors.
Additional Features
Other available feature flags include:
hypernative-tlspool-hyperpool-native-tlshyper-native-tls
All Hyper-related features are gated behind the hyper flag. The native-tls feature enables native TLS support, while rustls is used as the default TLS implementation.
Examples
For implementation details, please refer to examples
(Credits to respective authors for the monoio packages)