Module types

Module types 

Source

Structs§

DnsErrorPayload
Defines the case payload type for DNS-error above:
FieldSizePayload
Defines the case payload type for HTTP-response-{header,trailer}-size above:
Fields
This following block defines the fields resource which corresponds to HTTP standard Fields. Fields are a common representation used for both Headers and Trailers.
FutureIncomingResponse
Represents a future which may eventually return an incoming HTTP Response, or an error.
FutureTrailers
Represents a future which may eventually return trailers, or an error.
IncomingBody
Represents an incoming HTTP Request or Response’s Body.
IncomingRequest
Represents an incoming HTTP Request.
IncomingResponse
Represents an incoming HTTP Response.
OutgoingBody
Represents an outgoing HTTP Request or Response’s Body.
OutgoingRequest
Represents an outgoing HTTP Request.
OutgoingResponse
Represents an outgoing HTTP Response.
RequestOptions
Parameters for making an HTTP Request. Each of these parameters is currently an optional timeout applicable to the transport layer of the HTTP protocol.
ResponseOutparam
Represents the ability to send an HTTP Response.
TlsAlertReceivedPayload
Defines the case payload type for TLS-alert-received above:

Enums§

ErrorCode
These cases are inspired by the IANA HTTP Proxy Error Types: https://www.iana.org/assignments/http-proxy-status/http-proxy-status.xhtml#table-http-proxy-error-types
HeaderError
This type enumerates the different kinds of errors that may occur when setting or appending to a fields resource.
Method
This type corresponds to HTTP standard Methods.
Scheme
This type corresponds to HTTP standard Related Schemes.

Functions§

http_error_code
Attempts to extract a http-related error from the wasi:io error provided.

Type Aliases§

Duration
FieldKey
Field keys are always strings.
FieldName
Field names are always strings.
FieldValue
Field values should always be ASCII strings. However, in reality, HTTP implementations often have to interpret malformed values, so they are provided as a list of bytes.
Headers
Headers is an alias for Fields.
InputStream
IoError
OutputStream
Pollable
StatusCode
This type corresponds to the HTTP standard Status Code.
Trailers
Trailers is an alias for Fields.