http_req
Simple and lightweight HTTP client with built-in HTTPS support.
- HTTP and HTTPS via rust-native-tls (or optionally rus-tls)
- Small binary size (0.7 MB for a basic GET request in the default configuratio)
- Minimal number of dependencies
Requirements
http_req by default uses rust-native-tls, which relies on TLS framework provided by OS on Windows and macOS, and OpenSSL on all other platforms. But it also supports rus-tls.
Example
Basic HTTP GET request
use request;
Take a look at more examples
Usage
Default configuration
In order to use http_req with default configuration, add the following lines to Cargo.toml:
[]
= "^0.13"
Rustls
In order to use http_req with rustls in your project, add the following lines to Cargo.toml:
[]
= { ="^0.13", = false, = ["rust-tls"] }
License
Licensed under MIT.