Available on crate feature
http only.Expand description
Incoming and outgoing HTTP requests.
Modules§
- body
- Utilities for working with HTTP message bodies.
- grpc
grpc - gRPC helpers for serving tonic services. gRPC helpers for serving tonic services from Spin components.
Structs§
- Header
Map - A specialized multimap for header names and values.
- Header
Name - Represents an HTTP header field name
- Header
Value - Represents an HTTP header field value.
- Json
json - A JSON wrapper for request and response bodies.
- Method
- The Request Method (VERB)
- Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Uri
- The URI component of a request.
Enums§
- Error
- The error type used for HTTP operations within the WASI environment.
Traits§
- From
Request - A trait for constructing a value from a
wasip3::http::types::Request. - From
Response - A trait for constructing a value from a
wasip3::http::types::Response. - Incoming
Message - Internal trait representing a readable inbound HTTP message.
- Into
Request - A trait for any type that can be converted into a
wasip3::http::types::Request. - Into
Response - A trait for any type that can be converted into a
wasip3::http::types::Response.
Functions§
- delete
- Sends a DELETE request to the given URL.
- get
- Sends a GET request to the given URL.
- patch
- Sends a PATCH request with the given body.
- post
- Sends a POST request with the given body.
- put
- Sends a PUT request with the given body.
- send
- Sends an HTTP request and returns the corresponding
wasip3::http::types::Response.
Type Aliases§
- Empty
Body - A body type representing an empty payload.
- Full
Body - A body type representing a complete, in-memory payload.
- Optional
Body - A body type representing an optional payload.
- Request
- A type alias for an HTTP request with a customizable body type.
- Response
- A type alias for an HTTP response with a customizable body type.
- Result
- A alias for
std::result::Resultthat usesErroras the default error type.