http
Version:
sha256:5a568e6
types interface
Imported Types
wasi:clocks/monotonic-clock.{duration}
wasi:io/streams.{input-stream}
wasi:io/streams.{output-stream}
wasi:io/error.{error as io-error}
wasi:io/poll.{pollable}
method:variant {
get
head
post
put
delete
connect
options
trace
patch
other(string)
}scheme:variant {
HTTP
HTTPS
other(string)
}DNS-error-payload:record {
rcode: option<string>
info-code: option<u16>
}TLS-alert-received-payload:record {
alert-id: option<u8>
alert-message: option<string>
}field-size-payload:record {
field-name: option<string>
field-size: option<u32>
}error-code:variant {
DNS-timeout
DNS-error(DNS-error-payload)
destination-not-found
destination-unavailable
destination-IP-prohibited
destination-IP-unroutable
connection-refused
connection-terminated
connection-timeout
connection-read-timeout
connection-write-timeout
connection-limit-reached
TLS-protocol-error
TLS-certificate-error
TLS-alert-received(TLS-alert-received-payload)
HTTP-request-denied
HTTP-request-length-required
HTTP-request-body-size(option<u64>)
HTTP-request-method-invalid
HTTP-request-URI-invalid
HTTP-request-URI-too-long
HTTP-request-header-section-size(option<u32>)
HTTP-request-header-size(option<field-size-payload>)
HTTP-request-trailer-section-size(option<u32>)
HTTP-request-trailer-size(field-size-payload)
HTTP-response-incomplete
HTTP-response-header-section-size(option<u32>)
HTTP-response-header-size(field-size-payload)
HTTP-response-body-size(option<u64>)
HTTP-response-trailer-section-size(option<u32>)
HTTP-response-trailer-size(field-size-payload)
HTTP-response-transfer-coding(option<string>)
HTTP-response-content-coding(option<string>)
HTTP-response-timeout
HTTP-upgrade-failed
HTTP-protocol-error
loop-detected
configuration-error
internal-error(option<string>)
}header-error:variant {
invalid-syntax
forbidden
immutable
}field-key:string
field-value:list<u8>
fields:resource {
}
headers:fields
trailers:fields
incoming-request:resource {
path-with-query() → option<string>
authority() → option<string>
}outgoing-request:resource {
path-with-query() → option<string>
set-path-with-query(path-with-query:option<string>) → result<_, _>
authority() → option<string>
set-authority(authority:option<string>) → result<_, _>
}request-options:resource {
}
response-outparam:resource {
}
status-code:u16
incoming-response:resource {
}
incoming-body:resource {
}
future-trailers:resource {
}
outgoing-response:resource {
}
outgoing-body:resource {
}
future-incoming-response:resource {
}
incoming-handler interface
outgoing-handler interface
Imported Types
wasi:http/types.{outgoing-request}
wasi:http/types.{request-options}
wasi:http/types.{future-incoming-response}
wasi:http/types.{error-code}
handle(request:outgoing-request, options:option<request-options>) → result<future-incoming-response, error-code>