#wasi #http-client #client-server

macro waki-macros

HTTP client and server library for WASI

4 releases (2 breaking)

0.3.1 Jul 19, 2024
0.3.0 Jun 14, 2024
0.2.0 Jun 7, 2024
0.1.0 Jun 5, 2024

#183 in #wasi

Download history 279/week @ 2024-06-03 145/week @ 2024-06-10 48/week @ 2024-06-17 136/week @ 2024-06-24 112/week @ 2024-07-01 109/week @ 2024-07-08 210/week @ 2024-07-15 69/week @ 2024-07-22 184/week @ 2024-07-29 78/week @ 2024-08-05 59/week @ 2024-08-12 62/week @ 2024-08-19 100/week @ 2024-08-26 184/week @ 2024-09-02 152/week @ 2024-09-09 127/week @ 2024-09-16

569 downloads per month
Used in waki

Apache-2.0

4KB

waki

HTTP client and server library for WASI.

Send a request:

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

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

Writing an HTTP component:

use waki::{handler, ErrorCode, Request, Response};

#[handler]
fn hello(req: Request) -> Result<Response, ErrorCode> {
    Response::builder().body(b"Hello, WASI!").build()
}

Dependencies

~240–680KB
~16K SLoC