Crates.io | attohttpc |
lib.rs | attohttpc |
version | |
source | src |
created_at | 2019-03-23 01:45:31.172639 |
updated_at | 2024-12-07 20:47:39.123499 |
description | Small and lightweight HTTP client |
homepage | https://github.com/sbstp/attohttpc |
repository | https://github.com/sbstp/attohttpc |
max_upload_size | |
id | 123217 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Documentation | Crates.io | Repository
This project's goal is to provide a lightweight and simple HTTP client for the Rust ecosystem. The intended use is for projects that have HTTP needs where performance is not critical or when HTTP is not the main purpose of the application. Note that the project still tries to perform well and avoid allocation where possible, but stays away from Rust's asynchronous stack to provide a crate that's as small as possible. Features are provided behind feature flags when possible to allow users to get just what they need. Here are the goals of the project:
http
, url
, encoding_rs
), not reinventing the wheel.basic-auth
support for basic authcharsets
support for decoding more text encodings than just UTF-8compress
support for decompressing response bodies using miniz_oxide
(default)compress-zlib
support for decompressing response bodies using zlib
instead of miniz_oxide
(see flate2 backends)compress-zlib-ng
support for decompressing response bodies using zlib-ng
instead of miniz_oxide
(see flate2 backends)json
support for serialization and deserializationform
support for url encoded forms (does not include support for multipart)multipart-form
support for multipart forms (does not include support for url encoding)tls-native
support for tls connections using the native-tls
crate (default)tls-native-vendored
activate the vendored
feature of native-tls
tls-rustls-webpki-roots
support for TLS connections using rustls
instead of native-tls
with Web PKI rootstls-rustls-native-roots
support for TLS connections using rustls
with root certificates loaded from the rustls-native-certs
crateSee the examples/
folder in the repository for more use cases.
let resp = attohttpc::post("https://my-api.com/do/something").json(&request)?.send()?;
if resp.is_success() {
let response = resp.json()?;
// ...
}
native-tls
and rustls
HTTP_PROXY
, HTTPS_PROXY
, NO_PROXY
environment variables.This project is licensed under the MPL-2.0
.