From 516004de4170baf52f322c274efbccf0d9cc2a9c Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Fri, 6 Sep 2024 03:17:54 +0100 Subject: w-h/0.2.0: Add a new example program env-var This shows how to get access to the environment variables and echos them back to the client. We need to include wasi:cli/environment@0.2.0 in the proxy world. Signed-off-by: Andrew Clayton --- c/wasi-http/wit/wasi-http/0.2.0/proxy.wit | 2 ++ 1 file changed, 2 insertions(+) (limited to 'c/wasi-http/wit') diff --git a/c/wasi-http/wit/wasi-http/0.2.0/proxy.wit b/c/wasi-http/wit/wasi-http/0.2.0/proxy.wit index 687c24d..60b9932 100644 --- a/c/wasi-http/wit/wasi-http/0.2.0/proxy.wit +++ b/c/wasi-http/wit/wasi-http/0.2.0/proxy.wit @@ -20,6 +20,8 @@ world proxy { /// when this import is properly removed. import wasi:cli/stdin@0.2.0; + import wasi:cli/environment@0.2.0; + /// This is the default handler to use when user code simply wants to make an /// HTTP request (e.g., via `fetch()`). import outgoing-handler; -- cgit