wit-component 0.8.1

Tooling for working with `*.wit` and component files together.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// 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.
//
default interface outgoing-handler {
  use pkg.types.{outgoing-request, request-options, future-incoming-response}

  // 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.
  handle: func(
    request: outgoing-request,
    options: option<request-options>
  ) -> future-incoming-response
}