spin_sdk::http - Rust (original) (raw)
Expand description
Helpers for building Spin wasi-http
components.
Traits for converting between the various types
Helper functions for creating responses
A macro to help with constructing a Router from a stream of tokens.
A Body extractor
A common representation for headers and trailers.
A header value.
Represents an incoming HTTP request.
Represents an incoming HTTP Response.
A Json extractor
An error parsing a JSON body
An error when the body is not UTF-8
Represents an outgoing HTTP Request or Response’s Body.
Represents an outgoing HTTP Request.
Represents an outgoing HTTP response.
A unified request object that can represent both incoming and outgoing requests.
A builder for non-streaming outgoing HTTP requests. You can obtain a RequestBuilder from the Request::builder() method, or from method-specific helpers such as Request::get() or Request::post().
A unified response object that can represent both outgoing and incoming responses.
A builder for `Response``
A parameter provided by Spin for setting a streaming OutgoingResponse.
Routes HTTP requests within a Spin component.
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
This type corresponds to HTTP standard Methods.
This type corresponds to HTTP standard Related Schemes.
An error encountered when performing an HTTP request
An HTTP request handler.
A trait for any type that can be turned into a Response
Send an outgoing request
Headers is an alias for Fields.
Route parameters extracted from a URI that match a route pattern.
This type corresponds to the HTTP standard Status Code.
Trailers is an alias for Fields.