Expand description
Helpers for building Spin wasi-http
components.
Modules§
- conversions
- Traits for converting between the various types
- responses
- Helper functions for creating responses
Macros§
- http_
router - A macro to help with constructing a Router from a stream of tokens.
Structs§
- Body
- A Body extractor
- 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. - Header
Value - A header value.
- Incoming
Request - Represents an incoming HTTP Request.
- Incoming
Response - Represents an incoming HTTP Response.
- Json
- A Json extractor
- Json
Body Error - An error parsing a JSON body
- NonUtf8
Body Error - An error when the body is not UTF-8
- Outgoing
Body - Represents an outgoing HTTP Request or Response’s Body.
- Outgoing
Request - Represents an outgoing HTTP Request.
- Outgoing
Response - Represents an outgoing HTTP Response.
- Request
- A unified request object that can represent both incoming and outgoing requests.
- Request
Builder - A request builder
- Response
- A unified response object that can represent both outgoing and incoming responses.
- Response
Builder - A builder for `Response``
- Response
Outparam - The out param for setting an
OutgoingResponse
- Router
- Exports HTTP Router items. The Spin SDK HTTP router.
Enums§
- Error
Code - 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
- Method
- This type corresponds to HTTP standard Methods.
- Scheme
- This type corresponds to HTTP standard Related Schemes.
- Send
Error - An error encountered when performing an HTTP request
Traits§
- Handler
- Exports HTTP Router items. An HTTP request handler.
- Into
Response - A trait for any type that can be turned into a
Response
Functions§
- send
- Send an outgoing request
Type Aliases§
- Headers
- Headers is an alias for Fields.
- Params
- Exports HTTP Router items. Route parameters extracted from a URI that match a route pattern.
- Status
Code - This type corresponds to the HTTP standard Status Code.
- Trailers
- Trailers is an alias for Fields.