Skip to main content

wasmtime_wasi_http/
request_options.rs

1use std::time::Duration;
2
3/// The concrete type behind a `wasi:http/types.request-options` resource.
4#[derive(Copy, Clone, Debug, Default, PartialEq, Eq)]
5pub struct RequestOptions {
6    /// How long to wait for a connection to be established.
7    pub connect_timeout: Option<Duration>,
8    /// How long to wait for the first byte of the response body.
9    pub first_byte_timeout: Option<Duration>,
10    /// How long to wait between frames of the response body.
11    pub between_bytes_timeout: Option<Duration>,
12}