11 unstable releases (3 breaking)

0.4.0 May 23, 2020
0.3.3 May 21, 2020
0.2.2 May 20, 2020
0.1.2 May 20, 2020

#60 in #relay

37 downloads per month

MIT license

21KB
493 lines

Asynchronous HTTP client.

This crate provides a simple HTTP client and is built on top of async-std.

  • Fully streaming requests and responses
  • TLS/SSL enabled by default
  • Relay through HTTP proxy or UNIX socket

Example:

async_fetch::{Method, Request};

// request
let mut req = Request::parse_url("https://domain.com").unwrap();
req.set_method(Method::Post);
// response
let mut res = req.send().await?;
let data = res.recv().await.unwrap();

Todo:

  • Handle redirects
  • Add retry logic

Dependencies

~6–16MB
~246K SLoC