Skip to content

Commit

Permalink
Sync with the upstream wasi-http types.wit
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottt committed Dec 5, 2023
1 parent 0c8114c commit be26628
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions crates/wasi-http/wit/deps/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ interface types {
append: func(name: field-key, value: field-value) -> result<_, header-error>;

/// Retrieve the full set of keys and values in the Fields. Like the
/// constructor, the list represents each key-value pair.
/// constructor, the list represents each key-value pair.
///
/// The outer list represents each key-value pair in the Fields. Keys
/// which have multiple values are represented by multiple entries in this
Expand Down Expand Up @@ -315,8 +315,9 @@ interface types {
headers: func() -> headers;
}

/// Parameters for making an HTTP Request. Each of these parameters is an
/// optional timeout, applicable to the transport layer of the HTTP protocol.
/// Parameters for making an HTTP Request. Each of these parameters is
/// currently an optional timeout applicable to the transport layer of the
/// HTTP protocol.
///
/// These timeouts are separate from any the user may use to bound a
/// blocking call to `wasi:io/poll.poll`.
Expand All @@ -329,14 +330,14 @@ interface types {

/// Set the timeout for the initial connect to the HTTP Server. An error
/// return value indicates that this timeout is not supported.
set-connect-timeout: func(duration: option<duration>) -> result;
set-connect-timeout: func(ms: option<duration>) -> result;

/// The timeout for receiving the first byte of the Response body.
first-byte-timeout: func() -> option<duration>;

/// Set the timeout for receiving the first byte of the Response body. An
/// error return value indicates that this timeout is not supported.
set-first-byte-timeout: func(duration: option<duration>) -> result;
set-first-byte-timeout: func(ms: option<duration>) -> result;

/// The timeout for receiving subsequent chunks of bytes in the Response
/// body stream.
Expand All @@ -345,7 +346,7 @@ interface types {
/// Set the timeout for receiving subsequent chunks of bytes in the Response
/// body stream. An error return value indicates that this timeout is not
/// supported.
set-between-bytes-timeout: func(duration: option<duration>) -> result;
set-between-bytes-timeout: func(ms: option<duration>) -> result;
}

/// Represents the ability to send an HTTP Response.
Expand Down
13 changes: 7 additions & 6 deletions crates/wasi/wit/deps/http/types.wit
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ interface types {
append: func(name: field-key, value: field-value) -> result<_, header-error>;

/// Retrieve the full set of keys and values in the Fields. Like the
/// constructor, the list represents each key-value pair.
/// constructor, the list represents each key-value pair.
///
/// The outer list represents each key-value pair in the Fields. Keys
/// which have multiple values are represented by multiple entries in this
Expand Down Expand Up @@ -315,8 +315,9 @@ interface types {
headers: func() -> headers;
}

/// Parameters for making an HTTP Request. Each of these parameters is an
/// optional timeout, applicable to the transport layer of the HTTP protocol.
/// Parameters for making an HTTP Request. Each of these parameters is
/// currently an optional timeout applicable to the transport layer of the
/// HTTP protocol.
///
/// These timeouts are separate from any the user may use to bound a
/// blocking call to `wasi:io/poll.poll`.
Expand All @@ -329,14 +330,14 @@ interface types {

/// Set the timeout for the initial connect to the HTTP Server. An error
/// return value indicates that this timeout is not supported.
set-connect-timeout: func(duration: option<duration>) -> result;
set-connect-timeout: func(ms: option<duration>) -> result;

/// The timeout for receiving the first byte of the Response body.
first-byte-timeout: func() -> option<duration>;

/// Set the timeout for receiving the first byte of the Response body. An
/// error return value indicates that this timeout is not supported.
set-first-byte-timeout: func(duration: option<duration>) -> result;
set-first-byte-timeout: func(ms: option<duration>) -> result;

/// The timeout for receiving subsequent chunks of bytes in the Response
/// body stream.
Expand All @@ -345,7 +346,7 @@ interface types {
/// Set the timeout for receiving subsequent chunks of bytes in the Response
/// body stream. An error return value indicates that this timeout is not
/// supported.
set-between-bytes-timeout: func(duration: option<duration>) -> result;
set-between-bytes-timeout: func(ms: option<duration>) -> result;
}

/// Represents the ability to send an HTTP Response.
Expand Down

0 comments on commit be26628

Please sign in to comment.