diff --git a/src/async_client.rs b/src/async_client.rs index f8201011..b4dd6e96 100644 --- a/src/async_client.rs +++ b/src/async_client.rs @@ -52,7 +52,6 @@ pub struct AsyncClient { #[derive(Default, Debug)] pub struct AsyncClientConfig { proxy: Option, - use_sys_proxy: bool, user_agent: Option, disable_ssl_verification: bool, } @@ -63,25 +62,10 @@ impl AsyncClientConfig { } pub fn proxy(mut self, proxy: &str) -> Result { - if self.use_sys_proxy { - return Err(Error(InnerError::ConfigurationError( - "Using the system proxy has been previously configured.".to_string(), - ))); - } self.proxy = Some(reqwest::Proxy::all(proxy)?); Ok(self) } - pub fn use_sys_proxy(mut self) -> Result { - if self.proxy.is_some() { - return Err(Error(InnerError::ConfigurationError( - "A proxy has already been configured.".to_string(), - ))); - } - self.use_sys_proxy = true; - Ok(self) - } - pub fn disable_ssl_verification(mut self) -> Self { self.disable_ssl_verification = true; self @@ -162,12 +146,6 @@ impl AsyncClient { None => http_client, }; - let http_client = if config.use_sys_proxy { - http_client.use_sys_proxy() - } else { - http_client - }; - let mut headers = reqwest::header::HeaderMap::new(); let user_agent = match config.user_agent {