10 releases (4 breaking)
| 0.5.1 | Dec 12, 2024 |
|---|---|
| 0.5.0 | Nov 20, 2024 |
| 0.4.2 | Oct 31, 2024 |
| 0.3.2 | Oct 12, 2024 |
| 0.1.0 | Jun 5, 2024 |
#180 in #wasi
601 downloads per month
Used in waki
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
~155–560KB
~13K SLoC