mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-02-06 15:26:54 +00:00
fix(core): http timeout field is optional, closes #4036
This commit is contained in:
parent
220e746014
commit
ec79e075a9
@ -48,7 +48,7 @@ pub struct ClientBuilder {
|
||||
/// Max number of redirections to follow.
|
||||
pub max_redirections: Option<usize>,
|
||||
/// Connect timeout for the request.
|
||||
#[serde(deserialize_with = "deserialize_duration")]
|
||||
#[serde(deserialize_with = "deserialize_duration", default)]
|
||||
pub connect_timeout: Option<Duration>,
|
||||
}
|
||||
|
||||
@ -469,7 +469,7 @@ pub struct HttpRequestBuilder {
|
||||
/// The request body
|
||||
pub body: Option<Body>,
|
||||
/// Timeout for the whole request
|
||||
#[serde(deserialize_with = "deserialize_duration")]
|
||||
#[serde(deserialize_with = "deserialize_duration", default)]
|
||||
pub timeout: Option<Duration>,
|
||||
/// The response type (defaults to Json)
|
||||
pub response_type: Option<ResponseType>,
|
||||
|
||||
@ -51,8 +51,8 @@ interface Duration {
|
||||
}
|
||||
|
||||
interface ClientOptions {
|
||||
maxRedirections: number
|
||||
connectTimeout: number | Duration
|
||||
maxRedirections?: number
|
||||
connectTimeout?: number | Duration
|
||||
}
|
||||
|
||||
enum ResponseType {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user