Wasm Directoryalpha
Resource

request-options

Parameters for making an HTTP Request. Each of these parameters is currently an optional timeout applicable to the transport layer of the HTTP protocol.

resource request-options;

F constructor

constructor: func() -> request-options;

Construct a default request-options value.

F get-connect-timeout

get-connect-timeout: func() -> option​<duration>;

The timeout for the initial connect to the HTTP Server.

F set-connect-timeout

set-connect-timeout: func(duration: option​<duration>) -> result​<_, request-options-error>;

Set the timeout for the initial connect to the HTTP Server. An error return value indicates that this timeout is not supported or that this handle is immutable.

F get-first-byte-timeout

get-first-byte-timeout: func() -> option​<duration>;

The timeout for receiving the first byte of the Response body.

F set-first-byte-timeout

set-first-byte-timeout: func(duration: option​<duration>) -> result​<_, request-options-error>;

Set the timeout for receiving the first byte of the Response body. An error return value indicates that this timeout is not supported or that this handle is immutable.

F get-between-bytes-timeout

get-between-bytes-timeout: func() -> option​<duration>;

The timeout for receiving subsequent chunks of bytes in the Response body stream.

F set-between-bytes-timeout

set-between-bytes-timeout: func(duration: option​<duration>) -> result​<_, request-options-error>;

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 or that this handle is immutable.

F clone

clone: func() -> request-options;

Make a deep copy of the request-options. The resulting request-options is mutable.