-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This reverts commit ce24bff.
- Loading branch information
Showing
3 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
package wasi:http | ||
package wasi:http; | ||
|
||
// 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. | ||
world proxy { | ||
// HTTP proxies have access to time and randomness. | ||
import wasi:clocks/wall-clock | ||
import wasi:clocks/monotonic-clock | ||
import wasi:clocks/timezone | ||
import wasi:random/random | ||
import wasi:clocks/wall-clock; | ||
import wasi:clocks/monotonic-clock; | ||
import wasi:clocks/timezone; | ||
import wasi:random/random; | ||
|
||
// Proxies have standard output and error streams which are expected to | ||
// terminate in a developer-facing console provided by the host. | ||
import wasi:cli/stdout | ||
import wasi:cli/stderr | ||
import wasi:cli/stdout; | ||
import wasi:cli/stderr; | ||
|
||
// TODO: this is a temporary workaround until component tooling is able to | ||
// gracefully handle the absence of stdin. Hosts must return an eof stream | ||
// for this import, which is what wasi-libc + tooling will do automatically | ||
// when this import is properly removed. | ||
import wasi:cli/stdin | ||
import wasi:cli/stdin; | ||
|
||
// This is the default handler to use when user code simply wants to make an | ||
// HTTP request (e.g., via `fetch()`). | ||
import outgoing-handler | ||
import 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 incoming-handler | ||
export incoming-handler; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters