<div align="center">
# http-request
**Sync & Async HTTP/1.1 + HTTP/2 Client**
[](https://crates.io/crates/http-request)
[](https://docs.rs/http-request)
[](https://www.rust-lang.org)
[](../LICENSE)
[Workspace Overview](../README.md) ยท [API Docs](https://docs.rs/http-request/latest/)
</div>
---
## Overview
Ergonomic HTTP client supporting reusable [`HttpClient`] instances (keep-alive pooling enabled by default, base URL resolution, default headers, Bearer/Basic auth, timeouts, retries, proxies, and custom PEM roots) alongside per-request [`RequestBuilder`] helpers (`send`, `send_async`, `try_body_json`, multipart/form uploads) and [`HttpResponse`] inspection methods (`error_for_status`, `content_type`, `content_length`, `location`, `text_strict`, `set_cookies`).
This crate is a member of the [`hyperlane`](../README.md) unified Rust 2024 workspace. All plugin crates are opt-in and transparent (`Status::Continue`) when unconfigured.
## Responsibilities & Module Layout
- `client` โ Reusable [`HttpClient`] and [`HttpClientBuilder`] with shared connection pooling, base URLs, default headers, auth helpers, timeouts, retries, proxies, and custom roots
- `request` / `pool` / `protocol` / `tls` โ Sync and Tokio-async HTTP/1.1 + HTTP/2 transports, 16-stripe keep-alive pools, RFC 9110/3986 redirect handling with credential stripping, and single-pass chunked/compressed decoding
- `response` โ [`HttpResponse`] wire parser, zero-copy in-place decoding, multi-`Set-Cookie` preservation, and typed body/header helpers
## Installation
```sh
cargo add http-request
```
## Verification
Run crate-scoped formatting, lint, and test gates from the workspace root:
```sh
cargo run -p hyperlane-cli -- fmt --check
cargo clippy -p http-request --all-features --all-targets -- -D warnings
cargo test -p http-request --all-features
```
## Documentation & Governance
- Update this `README.md` alongside any public API, plugin contract, or module-boundary change.
- Project standards and release workflows live in [`../.agents/skills/hyperlane/SKILL.md`](../.agents/skills/hyperlane/SKILL.md).
## License
This project is licensed under the MIT License. See the [LICENSE](../LICENSE) file for details.
## Contact
For inquiries, please contact the author at [root@devhub.vip](mailto:root@devhub.vip).