Skip to main content

next

Function next 

Source
pub async fn next(request: impl IntoRequest) -> Result<Response, ErrorCode>
Available on crate features http-middleware and http only.
Expand description

Sends an HTTP request to the next item in the middleware chain, and returns the wasip3::http::types::Response from that next item.

This function converts the provided value into a wasip3::http::types::Request using the IntoRequest trait, dispatches it to the WASI HTTP middleware handler, and awaits the resulting response.