All Projects → seanmonstar → Reqwest

seanmonstar / Reqwest

Licence: other
An easy and powerful Rust HTTP Client

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Reqwest

Martian
The HTTP abstraction library for Clojure/script, supporting Swagger, Schema, re-frame and more
Stars: ✭ 294 (-94%)
Mutual labels:  http-client
Gotql
GraphQL query utility for serverside apps
Stars: ✭ 322 (-93.42%)
Mutual labels:  http-client
Requests
Requests for PHP is a humble HTTP request library. It simplifies how you interact with other sites and takes away all your worries.
Stars: ✭ 3,433 (-29.88%)
Mutual labels:  http-client
Netty Http Client
An asynchronous http client in Java, with a clean, callback-based API, using Netty 4.x
Stars: ✭ 295 (-93.97%)
Mutual labels:  http-client
Http Request
Java HTTP Request Library
Stars: ✭ 3,247 (-33.68%)
Mutual labels:  http-client
Redux Requests
Declarative AJAX requests and automatic network state management for single-page applications
Stars: ✭ 330 (-93.26%)
Mutual labels:  http-client
Armeria
Your go-to microservice framework for any situation, from the creator of Netty et al. You can build any type of microservice leveraging your favorite technologies, including gRPC, Thrift, Kotlin, Retrofit, Reactive Streams, Spring Boot and Dropwizard.
Stars: ✭ 3,392 (-30.72%)
Mutual labels:  http-client
Restc Cpp
Modern C++ REST Client library
Stars: ✭ 371 (-92.42%)
Mutual labels:  http-client
Kurly
kurly is an alternative to the widely popular curl program, written in Golang.
Stars: ✭ 319 (-93.48%)
Mutual labels:  http-client
Mojito
An easy-to-use Elixir HTTP client, built on the low-level Mint library.
Stars: ✭ 333 (-93.2%)
Mutual labels:  http-client
Voterobot
微信朋友圈投票活动的“刷票”案例分析。
Stars: ✭ 297 (-93.93%)
Mutual labels:  http-client
Gretchen
Making fetch happen in TypeScript.
Stars: ✭ 301 (-93.85%)
Mutual labels:  http-client
Node Request Retry
💂 Wrap NodeJS request module to retry http requests in case of errors
Stars: ✭ 330 (-93.26%)
Mutual labels:  http-client
Http.fs
A simple, functional HTTP client library for F#
Stars: ✭ 295 (-93.97%)
Mutual labels:  http-client
Isahc
The practical HTTP client that is fun to use.
Stars: ✭ 338 (-93.1%)
Mutual labels:  http-client
Atom
Java course materials
Stars: ✭ 293 (-94.02%)
Mutual labels:  http-client
Comet
Modern PHP framework for building blazing fast REST APIs, CRUDs and microservices
Stars: ✭ 328 (-93.3%)
Mutual labels:  http-client
Karin
An elegant promise based HTTP client for the browser and node.js [WIP]
Stars: ✭ 393 (-91.97%)
Mutual labels:  http-client
Jodd
Jodd! Lightweight. Java. Zero dependencies. Use what you like.
Stars: ✭ 3,616 (-26.14%)
Mutual labels:  http-client
Http Shortcuts
Android app to create home screen shortcuts that trigger arbitrary HTTP requests
Stars: ✭ 329 (-93.28%)
Mutual labels:  http-client

reqwest

crates.io Documentation MIT/Apache-2 licensed CI

An ergonomic, batteries-included HTTP Client for Rust.

  • Plain bodies, JSON, urlencoded, multipart
  • Customizable redirect policy
  • HTTP Proxies
  • HTTPS via system-native TLS (or optionally, rustls)
  • Cookie Store
  • WASM
  • Changelog

Example

This asynchronous example uses Tokio and enables some optional features, so your Cargo.toml could look like this:

[dependencies]
reqwest = { version = "0.11", 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(())
}

Blocking Client

There is an optional "blocking" client API that can be enabled:

[dependencies]
reqwest = { version = "0.11", features = ["blocking", "json"] }
use std::collections::HashMap;

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

Requirements

On Linux:

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 OpenSSL 1.1.

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].