Expand description
Outgoing HTTP over WASI HTTP p3, using standard Rust HTTP request builders.
Requests have buffered byte bodies; responses can be streamed or collected. HTTP error statuses are responses, not transport errors. There are no automatic redirects or retries. Sending requires the WASI p3 runtime used by Golem agents.
Modules§
- header
- HTTP header types
Structs§
- Header
Map - A specialized multimap for header names and values.
- Header
Value - Represents an HTTP header field value.
- Method
- The Request Method (VERB)
- Request
- Represents an HTTP request.
- Request
Options Extension - A wrapper around
types::RequestOptionsthat implementsClone - Status
Code - An HTTP status code (
status-codein RFC 9110 et al.). - Uri
- The URI component of a request.
Enums§
- Error
- Failures sending a request or reading and decoding its response body.
Functions§
- response_
bytes - Collect the remaining body in memory, including checking its final result.
For large bodies, stream frames from
response.into_body()instead. - response_
json - Collect the remaining body in memory and decode JSON, regardless of status.
- response_
text - Collect the remaining body in memory and decode it as strict UTF-8.
- send
- Send a request, checking both upload and request transmission completion.
Type Aliases§
- Incoming
Response Body - The body type used for incoming HTTP responses.
- Response
- A type alias for an HTTP response with a customizable body type.