pub struct ReqwestClientConfig {
pub user_agent_suffix: String,
pub https_only: bool,
pub accept_invalid_host_names: bool,
pub accept_invalid_certificates: bool,
pub follow_redirects: bool,
pub host: Option<HeaderValue>,
pub origin: Option<HeaderValue>,
pub timeout_secs: u64,
pub exts_list: HashSet<ExtensionId>,
}Expand description
Configures the HTTP client.
Fields§
§user_agent_suffix: StringThis string is appended to the user agent.
It is provided so library users may identify their programs. This is ignored on wasm32.
https_only: boolIf set to true, connections will be required to use HTTPS.
This is ignored on wasm32.
accept_invalid_host_names: boolIf set to true, invalid host names will be accepted.
This is ignored on wasm32.
accept_invalid_certificates: boolIf set to true, invalid certificates will be accepted.
This is ignored on wasm32.
follow_redirects: boolIf true, HTTP redirects will be followed.
This is ignored on wasm32.
host: Option<HeaderValue>Specify Host
origin: Option<HeaderValue>Specify the value of the origin header.
Most browsers ignore this by default.
timeout_secs: u64Query timeout in seconds.
This corresponds to the total timeout of the request (connection plus reading all the data).
This is ignored on wasm32.
exts_list: HashSet<ExtensionId>Extension IDs.
The set of extension identifiers to be used in the exts_list in the media type.
Implementations§
Source§impl ReqwestClientConfig
impl ReqwestClientConfig
pub fn new( user_agent_suffix: Option<String>, https_only: Option<bool>, accept_invalid_host_names: Option<bool>, accept_invalid_certificates: Option<bool>, follow_redirects: Option<bool>, host: Option<HeaderValue>, origin: Option<HeaderValue>, timeout_secs: Option<u64>, exts_list: Option<HashSet<ExtensionId>>, ) -> Self
pub fn new_from_config( &self, user_agent_suffix: Option<String>, https_only: Option<bool>, accept_invalid_host_names: Option<bool>, accept_invalid_certificates: Option<bool>, follow_redirects: Option<bool>, host: Option<HeaderValue>, origin: Option<HeaderValue>, timeout_secs: Option<u64>, exts_list: Option<HashSet<ExtensionId>>, ) -> Self
Source§impl ReqwestClientConfig
impl ReqwestClientConfig
pub fn builder() -> NewReqwestClientConfigBuilder
Source§impl ReqwestClientConfig
impl ReqwestClientConfig
pub fn from_config(&self) -> NewFromConfigReqwestClientConfigBuilder<'_>
Trait Implementations§
Source§impl Clone for ReqwestClientConfig
impl Clone for ReqwestClientConfig
Source§fn clone(&self) -> ReqwestClientConfig
fn clone(&self) -> ReqwestClientConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more