waki-macros

Crates.iowaki-macros
lib.rswaki-macros
version0.5.1
sourcesrc
created_at2024-06-05 08:31:42.511181
updated_at2024-12-12 11:18:42.288746
descriptionHTTP client and server library for WASI
homepage
repositoryhttps://github.com/wacker-dev/waki
max_upload_size
id1262553
size3,650
Xinzhao Xu (iawia002)

documentation

README

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()
}
Commit count: 70

cargo fmt