
autodidaddict/echo-example
wascap
Public
wasmer run autodidaddict/echo-example
wasmer run autodidaddict/echo-example
Waxosuit Echo Example
This example WebAssembly module provides a demonstration of a Wasm module built according to the Wascap specification. You can run this module using Waxosuit.
This sample returns the incoming request as a JSON object so you can verify that the request/response pattern is working properly in your WebAssembly module. For example, when this is running on port 8080
:
$ curl localhost:8080/foo/bar?a=b | jq
{
"method": "GET",
"path": "/foo/bar",
"query_string": "a=b",
"headers": {
"accept": "*/*",
"host": "localhost:8080",
"user-agent": "curl/7.58.0"
},
"body": []
}
This WebAssembly module is signed with multiple capabilities, but you will need to provide at least the HTTP server capability for this module to work properly.