Struct wasi_experimental_http::Response [−][src]
pub struct Response {
pub status_code: StatusCode,
// some fields omitted
}
Expand description
An HTTP response
Fields
status_code: StatusCode
Implementations
Read a response body in a streaming fashion.
buf
is an arbitrary large buffer, that may be partially filled after each call.
The function returns the actual number of bytes that were written, and 0
when the end of the stream has been reached.
Read the entire body until the end of the stream.
Get the value of the name
header.
Returns HttpError::HeaderNotFound
if no such header was found.
Get the entire response header map for a given request.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl UnwindSafe for Response
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more