Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add response-outparam.send-informational #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions wit/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,21 @@ interface types {
/// other argument to `incoming-handler.handle`.
@since(version = 0.2.0)
resource response-outparam {
/// Send an HTTP 1xx response.
///
/// Unlike `response-outparam.set`, this does not consume the
/// `response-outparam`, allowing the guest to send an arbitrary number of
/// informational responses before sending the final response using
/// `response-outparam.set`.
///
/// This will return an `HTTP-protocol-error` if `status` is not in the
/// range [100-199], or an `internal-error` if the implementation does not
/// support informational responses.
@unstable(feature = informational-outbound-responses)
send-informational: func(
status: u16,
headers: headers
) -> result<_, error-code>;

/// Set the value of the `response-outparam` to either send a response,
/// or indicate an error.
Expand Down
Loading