Wasm Directoryalpha
Resource

incoming-response

Represents an incoming HTTP Response.

resource incoming-response;

F status

status: func() -> status-code;

Returns the status code from the incoming response.

F headers

headers: func() -> headers;

Returns the headers from the incoming response.

The returned headers resource is immutable: set, append, and delete operations will fail with header-error.immutable.

This headers resource is a child: it must be dropped before the parent incoming-response is dropped.

F consume

consume: func() -> result​<incoming-body, _>;

Returns the incoming body. May be called at most once. Returns error if called additional times.