| Crates.io | wasmedge_http_req |
| lib.rs | wasmedge_http_req |
| version | 0.9.0 |
| created_at | 2021-10-06 18:41:21.899276+00 |
| updated_at | 2022-05-18 14:32:17.918147+00 |
| description | HTTP client for the WasmEdge network socket API. Derived from the http_req library. |
| homepage | |
| repository | https://github.com/second-state/wasmedge_http_req |
| max_upload_size | |
| id | 461305 |
| size | 629,515 |
Simple and lightweight HTTP client for the low level wasmedge_wasi_socket library. It is to be compiled into WebAssembly bytecode targets and run on the WasmEdge Runtime.
This project is forked and derived from the http_req project created by jayjamesjay.
Basic GET request
use wasmedge_http_req::request;
fn main() {
let mut writer = Vec::new(); //container for body of a response
let res = request::get("http://127.0.0.1/", &mut writer).unwrap();
println!("Status: {} {}", res.status_code(), res.reason());
}
[dependencies]
wasmedge_http_req = "0.8.1"