// The `wasi:http/proxy` world captures a widely-implementable intersection of
// hosts that includes HTTP forward and reverse proxies. Components targeting
// this world may concurrently stream in and out any number of incoming and
// outgoing HTTP requests.
default world proxy {
// HTTP proxies have access to time and randomness.
import random: random.random
// TODO: add `import wall-clock: clocks.wall-clock`
// TODO: add `import monotonic-clock: clocks.monotonic-clock`
// This is the default logging handler to use when user code simply wants to
// log to a developer-facing console (e.g., via `console.log()`).
import console: logging.handler
// This is the default handler to use when user code simply wants to make an
// HTTP request (e.g., via `fetch()`).
import default-outgoing-HTTP: pkg.outgoing-handler
// The host delivers incoming HTTP requests to a component by calling the
// `handle` function of this exported interface. A host may arbitrarily reuse
// or not reuse component instance when delivering incoming HTTP requests and
// thus a component must be able to handle 0..N calls to `handle`.
export HTTP: pkg.incoming-handler
}