forked from WebAssembly/wasi-http
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.wit
More file actions
38 lines (33 loc) · 1007 Bytes
/
types.wit
File metadata and controls
38 lines (33 loc) · 1007 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
26
27
28
29
30
31
32
33
34
35
36
37
38
interface types {
use wasi:http/types@0.2.0.{
error-code as wasi-error-code,
method as wasi-method,
request-options as wasi-request-options,
scheme as wasi-scheme,
};
use wasi:clocks/monotonic-clock@0.2.0.{duration};
type error-code = wasi-error-code;
type method = wasi-method;
type scheme = wasi-scheme;
type fields = list<tuple<string, list<list<u8>>>>;
record request-options {
connect-timeout: option<duration>,
first-byte-timeout: option<duration>,
between-bytes-timeout: option<duration>,
}
record request {
body: stream<u8>,
trailers: future<option<fields>>,
method: method,
path-with-query: option<string>,
scheme: option<scheme>,
authority: option<string>,
headers: fields,
}
record response {
body: stream<u8>,
trailers: future<option<fields>>,
status: u16,
headers: fields,
}
}