// The `wasi:http/outgoing-handler` interface is meant to be imported by // components and implemented by the host. // // NOTE: in Preview3, this interface will be merged with // `wasi:http/outgoing-handler` into a single `wasi:http/handler` interface // that takes a `request` parameter and returns a `response` result. // interface outgoing-handler { use types.{outgoing-request, request-options, future-incoming-response, error}; // The parameter and result types of the `handle` function allow the caller // to concurrently stream the bodies of the outgoing request and the incoming // response. // Consumes the outgoing-request. Gives an error if the outgoing-request // is invalid or cannot be satisfied by this handler. handle: func( request: outgoing-request, options: option ) -> result; }