Repolode
seanmonstar

seanmonstar/reqwest

An ergonomic Rust HTTP client with async and blocking APIs, JSON, multipart, proxies, cookies and rustls TLS.

Stars
11,905
Forks
1,441
Open issues
487
Last commit
19 days ago

What is it?

reqwest is an HTTP client library for Rust. It provides both async and blocking clients, so it can be used in Tokio-based async programs or in simple synchronous code. Request bodies can be plain bytes, JSON, urlencoded forms or multipart uploads, and responses can be decoded into typed values.

The library includes a customizable redirect policy, HTTP proxy support, and a cookie store. HTTPS uses rustls by default; the native-tls feature switches to the operating system's TLS stack on Windows and macOS, or to OpenSSL on Linux, and a vendored OpenSSL option is also available. The crate can also be compiled to WASM.

Key features

  • 01Async and blocking clients
  • 02JSON, urlencoded and multipart request bodies
  • 03Customizable redirect policy
  • 04HTTP proxy support
  • 05HTTPS via rustls or system-native TLS
  • 06Cookie store and WASM support

Use cases

  • Calling REST or JSON APIs from a Rust service or CLI
  • Uploading files with multipart form requests
  • Making synchronous HTTP requests in a small tool without an async runtime

Quick start

  1. 1

    Add reqwest with the json feature and tokio to Cargo.toml

    reqwest = { version = "0.13", features = ["json"] }
  2. 2

    Add tokio with the full feature set to Cargo.toml

    tokio = { version = "1", features = ["full"] }
  3. 3

    Write the example code from the README into src/main.rs and run it

Things to know

  • Native TLS on Linux requires OpenSSL to be installed or the vendored feature to be enabled.

In collections

Topics

FAQ

What is reqwest?
An ergonomic Rust HTTP client with async and blocking APIs, JSON, multipart, proxies, cookies and rustls TLS. reqwest is an HTTP client library for Rust. It provides both async and blocking clients, so it can be used in Tokio-based async programs or in simple synchronous code. Request bodies can be plain bytes, JSON, urlencoded forms or multipart uploads, and responses can be decoded into typed values.
Is reqwest free to use? What license does it have?
reqwest is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is reqwest still maintained?
Actively maintained. The last commit to reqwest was on Oct 19, 2026.
What can I use reqwest for?
Calling REST or JSON APIs from a Rust service or CLI Uploading files with multipart form requests Making synchronous HTTP requests in a small tool without an async runtime
How do I install reqwest?
Add reqwest with the json feature and tokio to Cargo.toml: reqwest = { version = "0.13", features = ["json"] } Add tokio with the full feature set to Cargo.toml: tokio = { version = "1", features = ["full"] } Write the example code from the README into src/main.rs and run it
Where can I get reqwest?
The source code and installation instructions are on GitHub: https://github.com/seanmonstar/reqwest

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects