Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seanmonstar/reqwest
An easy and powerful Rust HTTP Client
https://github.com/seanmonstar/reqwest
http http-client rust
Last synced: 3 days ago
JSON representation
An easy and powerful Rust HTTP Client
- Host: GitHub
- URL: https://github.com/seanmonstar/reqwest
- Owner: seanmonstar
- License: apache-2.0
- Created: 2016-07-01T00:23:08.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-29T15:25:10.000Z (about 1 month ago)
- Last Synced: 2024-10-29T16:18:52.765Z (about 1 month ago)
- Topics: http, http-client, rust
- Language: Rust
- Homepage: https://docs.rs/reqwest
- Size: 1.96 MB
- Stars: 9,856
- Watchers: 75
- Forks: 1,113
- Open Issues: 431
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE-APACHE
Awesome Lists containing this project
- awesome-rust-cn - seanmonstar/reqwest - ci.org/seanmonstar/reqwest.svg?branch=master">](https://travis-ci.org/seanmonstar/reqwest) (Libraries / Web programming)
- awesome-rust - seanmonstar/reqwest - ci.org/seanmonstar/reqwest.svg?branch=master">](https://travis-ci.org/seanmonstar/reqwest) (Libraries / Web programming)
- awesome-trevor - reqwest - HTTP client library, supports async / await, HTTPS, proxies, cookies (Programming / Rust 🦀)
- awesome-rust - seanmonstar/reqwest
- awesome-rust-cn - seanmonstar/reqwest
- awesome-http - reqwest - activity/y/seanmonstar/reqwest) (Programming Languages / Rust)
- awesome-rust-zh - seanmonstar/reqwest - 一个符合人体工程学的 HTTP 客户端。[<img src="https://api.travis-ci.org/seanmonstar/reqwest.svg?branch=master">](https://travis-ci.org/seanmonstar/reqwest) (库 / 网页编程)
- my-awesome - seanmonstar/reqwest - client,rust pushed_at:2024-12 star:10.0k fork:1.1k An easy and powerful Rust HTTP Client (Rust)
- StarryDivineSky - seanmonstar/reqwest
- awesome-rust-list - reqwest
- awesome-rust-list - reqwest
README
# reqwest
[![crates.io](https://img.shields.io/crates/v/reqwest.svg)](https://crates.io/crates/reqwest)
[![Documentation](https://docs.rs/reqwest/badge.svg)](https://docs.rs/reqwest)
[![MIT/Apache-2 licensed](https://img.shields.io/crates/l/reqwest.svg)](./LICENSE-APACHE)
[![CI](https://github.com/seanmonstar/reqwest/workflows/CI/badge.svg)](https://github.com/seanmonstar/reqwest/actions?query=workflow%3ACI)An ergonomic, batteries-included HTTP Client for Rust.
- Async and blocking `Client`s
- Plain bodies, JSON, urlencoded, multipart
- Customizable redirect policy
- HTTP Proxies
- HTTPS via system-native TLS (or optionally, rustls)
- Cookie Store
- WASM## Example
This asynchronous example uses [Tokio](https://tokio.rs) and enables some
optional features, so your `Cargo.toml` could look like this:```toml
[dependencies]
reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["full"] }
```And then the code:
```rust,no_run
use std::collections::HashMap;#[tokio::main]
async fn main() -> Result<(), Box> {
let resp = reqwest::get("https://httpbin.org/ip")
.await?
.json::>()
.await?;
println!("{resp:#?}");
Ok(())
}
```## Commercial Support
For private advice, support, reviews, access to the maintainer, and the like, reach out for [commercial support][sponsor].
## Requirements
On Linux:
- OpenSSL with headers. See https://docs.rs/openssl for supported versions
and more details. Alternatively you can enable the `native-tls-vendored`
feature to compile a copy of OpenSSL.On Windows and macOS:
- Nothing.
Reqwest uses [rust-native-tls](https://github.com/sfackler/rust-native-tls),
which will use the operating system TLS framework if available, meaning Windows
and macOS. On Linux, it will use the available OpenSSL or fail to build if
not found.## License
Licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.## Sponsors
Support this project by becoming a [sponsor][].
[sponsor]: https://seanmonstar.com/sponsor