explaingit

seanmonstar/reqwest

11,597RustAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

The most popular Rust library for making HTTP requests, with async and blocking clients, built-in HTTPS via rustls, JSON support, file uploads, cookies, and proxy handling.

Mindmap

mindmap
  root((reqwest))
    What it does
      HTTP requests
      Async and blocking
      JSON and forms
    Features
      HTTPS built in
      Cookie support
      Proxy support
    Use Cases
      API calls
      File uploads
      Web scraping
    Tech Stack
      Rust
      Tokio
      rustls
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Fetch JSON from a REST API inside a Rust async application running on Tokio.

USE CASE 2

Upload files via multipart form POST in a Rust command-line tool.

USE CASE 3

Make authenticated HTTPS requests with custom headers and configurable redirect policies in Rust.

Tech stack

RustTokiorustlsOpenSSL

Getting it running

Difficulty · easy Time to first run · 5min
Use freely in any project, commercial or open source, under either MIT or Apache 2.0 terms, just keep the copyright notice.

In plain English

reqwest is a Rust library for making HTTP requests. If your Rust program needs to fetch a webpage, call an API, or send data to a server, reqwest is the tool most Rust developers reach for first. It provides both an asynchronous client (which lets your program do other work while waiting for a response) and a blocking client (which waits for each response before continuing, useful for simpler scripts). Out of the box, reqwest handles plain text responses, JSON payloads, form-encoded data, file uploads via multipart forms, cookies, and HTTP proxies. For HTTPS, it ships with a secure TLS library called rustls built in, so encrypted connections work without installing anything extra. If you prefer to use your operating system's own TLS support, that option is available on Windows and macOS. On Linux, it falls back to OpenSSL. A typical use case looks like this: make a GET request to a URL, wait for the response, parse the body as JSON, and use the result in your code. The README includes a minimal working example of exactly that, including the two dependency lines to add to your project's configuration file. The library integrates with Tokio, the most common async runtime in Rust. The README is intentionally brief and does not cover all configuration options. Full API documentation lives at docs.rs/reqwest and covers redirect policies, timeouts, custom headers, and other details. The project is available under both Apache 2.0 and MIT licenses, meaning you can use it in most commercial or open-source projects without restriction.

Copy-paste prompts

Prompt 1
Using reqwest in Rust, write an async function that calls a JSON REST API, deserializes the response with serde, and returns a typed struct. Include the Cargo.toml dependency lines.
Prompt 2
Show me how to POST a multipart form with a file attachment using reqwest in a Tokio async Rust project.
Prompt 3
I need synchronous HTTP requests in a Rust script that has no async runtime. Show me how to use reqwest's blocking client with a custom timeout.
Prompt 4
How do I configure reqwest to set a default Authorization header on every request, limit redirects to 3, and disable certificate verification for local testing?
Open on GitHub → Explain another repo

← seanmonstar on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.