• Stars
    star
    8,010
  • Rank 4,403 (Top 0.09 %)
  • Language
    Rust
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An easy and powerful Rust HTTP Client

reqwest

crates.io Documentation MIT/Apache-2 licensed CI

An ergonomic, batteries-included HTTP Client for Rust.

  • Async and blocking Clients
  • 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 and enables some optional features, so your Cargo.toml could look like this:

[dependencies]
reqwest = { version = "0.12", features = ["json"] }
tokio = { version = "1", features = ["full"] }

And then the code:

use std::collections::HashMap;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let resp = reqwest::get("https://httpbin.org/ip")
        .await?
        .json::<HashMap<String, String>>()
        .await?;
    println!("{resp:#?}");
    Ok(())
}

Commercial Support

For private advice, support, reviews, access to the maintainer, and the like, reach out for commercial support.

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, 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

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.

More Repositories

1

warp

A super-easy, composable, web server framework for warp speeds.
Rust
9,057
star
2

num_cpus

Get the number of CPUs in Rust
Rust
510
star
3

httparse

A push parser for the HTTP 1.x protocol in Rust.
Rust
499
star
4

pretty-env-logger

A pretty, easy-to-use logger for Rust.
Rust
441
star
5

intel

I need more intel!
JavaScript
200
star
6

futures-fs

Access File System operations off-thread, using a Futures.
Rust
65
star
7

unicase

Unicode Case-folding for Rust
Rust
60
star
8

spmc

Rust
55
star
9

want

Rust
33
star
10

insist

A drop-in replacement for `assert` with a better default message.
JavaScript
32
star
11

symbol

ES6 Symbols in your ES5.
JavaScript
29
star
12

vecio

Rust
27
star
13

try-lock

A lightweight lock protected by an atomic boolean.
Rust
23
star
14

hood

Cover your head. Security headers middlware
JavaScript
21
star
15

ServiceDroid

ServiceDroid is an Android application built to assist Jehovah's Witnesses doing volunteer work.
Java
20
star
16

l20n.rs

Deprecated
Rust
16
star
17

MGFX.Tabs

A simple to use Tabs plugin for MooTools.
JavaScript
15
star
18

futures-compat

A compatibility shim between futures v0.1 and v0.2.
Rust
11
star
19

tick

Rust
10
star
20

tower-h3

Rust HTTP/3 + tower Service
Rust
9
star
21

merit

Rust
9
star
22

android-browserid

Use the BrowserID protocol easily in native Android apps.
Java
9
star
23

splatmonstar

Issue tracker for tentmonstar, a Tent client on Android.
7
star
24

mocha-text-cov

text summary of code coverage for Mocha
JavaScript
6
star
25

hyper-benchmarks

Performance benchmarks for hyper.rs
4
star
26

gryphon

HTTP Request Signing with Ed25519
JavaScript
4
star
27

dbug

debug moar
JavaScript
4
star
28

cookies

Rust
3
star
29

dotfiles

These aren't the droids you're looking for.
Vim Script
3
star
30

ansi.rs

ANSI colors for Rust
Rust
2
star
31

syslogger

A sane syslog API.
JavaScript
2
star
32

relay

Rust
2
star
33

seanmonstar.github.io

HTML
1
star
34

noom

Super simple Enum types
JavaScript
1
star
35

intel-syslog

A syslog handler for intel logging.
JavaScript
1
star
36

js

Some of my JavaScript extensions
JavaScript
1
star