#wasi #http-client

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

#1424 in WebAssembly

Download history 1/week @ 2024-06-10 27/week @ 2024-07-29

142 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

~3MB
~69K SLoC