#http-client #wasi

wasi-http-client

HTTP client library for WASI

4 releases

0.2.1 May 20, 2024
0.2.0 May 20, 2024
0.1.1 May 13, 2024
0.1.0 May 11, 2024

#770 in WebAssembly

Download history 143/week @ 2024-05-05 172/week @ 2024-05-12 287/week @ 2024-05-19

602 downloads per month

Apache-2.0

17KB
291 lines

wasi-http-client

HTTP client library for WASI Preview 2, making it easier to send http(s) requests in WASI components.

let resp = Client::new()
    .post("https://httpbin.org/post")
    .connect_timeout(Duration::from_secs(5))
    .send()?;

println!("status code: {}", resp.status());

lib.rs:

wasi-http-client

wasi_http_client is an HTTP client library for WASI Preview 2, making it easier to send http(s) requests in WASI components.

let resp = Client::new()
    .post("https://httpbin.org/post")
    .connect_timeout(Duration::from_secs(5))
    .send()?;

println!("status code: {}", resp.status());

Dependencies

~3.5MB
~91K SLoC