-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathclient.wit
More file actions
25 lines (20 loc) · 942 Bytes
/
Copy pathclient.wit
File metadata and controls
25 lines (20 loc) · 942 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package wasi:http@0.2.0;
/// The `wasi:http/client` world captures making outgoing HTTP requests.
world client {
/// HTTP proxies have access to time and randomness.
include wasi:clocks/imports@0.2.0;
import wasi:random/random@0.2.0;
/// Proxies have standard output and error streams which are expected to
/// terminate in a developer-facing console provided by the host.
import wasi:cli/stdout@0.2.0;
import wasi:cli/stderr@0.2.0;
/// TODO: this is a temporary workaround until component tooling is able to
/// gracefully handle the absence of stdin. Hosts must return an eof stream
/// for this import, which is what wasi-libc + tooling will do automatically
/// when this import is properly removed.
import wasi:cli/stdin@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;
export wasi:cli/run@0.2.0;
}