Skip to main content

Module http

Module http 

Source
Available on crate feature http only.
Expand description

Incoming and outgoing HTTP requests.

Modules§

body
Utilities for working with HTTP message bodies.
grpcgrpc
gRPC helpers for serving tonic services. gRPC helpers for serving tonic services from Spin components.

Structs§

HeaderMap
A specialized multimap for header names and values.
HeaderName
Represents an HTTP header field name
HeaderValue
Represents an HTTP header field value.
Jsonjson
A JSON wrapper for request and response bodies.
Method
The Request Method (VERB)
StatusCode
An HTTP status code (status-code in 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§

FromRequest
A trait for constructing a value from a wasip3::http::types::Request.
FromResponse
A trait for constructing a value from a wasip3::http::types::Response.
IncomingMessage
Internal trait representing a readable inbound HTTP message.
IntoRequest
A trait for any type that can be converted into a wasip3::http::types::Request.
IntoResponse
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§

EmptyBody
A body type representing an empty payload.
FullBody
A body type representing a complete, in-memory payload.
OptionalBody
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::Result that uses Error as the default error type.