default_send_request

Function default_send_request 

Source
pub async fn default_send_request(
    req: Request<impl Body<Data = Bytes, Error = ErrorCode> + Send + 'static>,
    options: Option<RequestOptions>,
) -> Result<(Response<impl Body<Data = Bytes, Error = ErrorCode>>, impl Future<Output = Result<(), ErrorCode>> + Send), ErrorCode>
Available on crate features p3 and default-send-request only.
Expand description

The default implementation of how an outgoing request is sent.

This implementation is used by the wasi:http/handler interface default implementation.

The returned Future can be used to communicate a request processing error, if any, to the constructor of the request. For example, if the request was constructed via wasi:http/types.request#new, a result resolved from it will be forwarded to the guest on the future handle returned.

This function performs no Content-Length validation.