[][src]Struct tauri_api::http::HttpRequestOptions

pub struct HttpRequestOptions {
    pub method: String,
    pub url: String,
    pub params: Option<HashMap<String, Value>>,
    pub headers: Option<HashMap<String, Value>>,
    pub body: Option<Value>,
    pub follow_redirects: Option<bool>,
    pub max_redirections: Option<u32>,
    pub connect_timeout: Option<u64>,
    pub read_timeout: Option<u64>,
    pub timeout: Option<u64>,
    pub allow_compression: Option<bool>,
    pub body_type: Option<BodyType>,
    pub response_type: Option<ResponseType>,
}

The configuration object of an HTTP request

Fields

method: String

The request method (GET, POST, PUT, DELETE, PATCH, HEAD, OPTIONS, CONNECT or TRACE)

url: String

The request URL

params: Option<HashMap<String, Value>>

The request query params

headers: Option<HashMap<String, Value>>

The request headers

body: Option<Value>

The request body

follow_redirects: Option<bool>

Whether to follow redirects or not

max_redirections: Option<u32>

Max number of redirections to follow

connect_timeout: Option<u64>

Connect timeout for the request

read_timeout: Option<u64>

Read timeout for the request

timeout: Option<u64>

Timeout for the whole request

allow_compression: Option<bool>

Whether the request will announce that it accepts compression

body_type: Option<BodyType>

The body type (defaults to Auto)

response_type: Option<ResponseType>

The response type (defaults to Json)

Trait Implementations

impl<'de> Deserialize<'de> for HttpRequestOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,