pub struct HttpClientBuilder { /* private fields */ }
Implementations§
Source§impl HttpClientBuilder
impl HttpClientBuilder
pub fn new() -> Self
Sourcepub fn build_async(&mut self) -> HttpClient
pub fn build_async(&mut self) -> HttpClient
Finish building, and return asynchronous HTTP client
Sourcepub fn build_sync(&mut self) -> HttpSyncClient
pub fn build_sync(&mut self) -> HttpSyncClient
Finish building, and return blocking synchronous HTTP client
Sourcepub fn follow_location(self) -> Self
pub fn follow_location(self) -> Self
Will always follow Location headers it encounters
pub fn timeout(self, seconds: u64) -> Self
Cookie jar file, will be auto-maintained unless you change auto-update to false via CookieJar::set_auto_update(bool) method.
Set cookies from contents / lines of a Netscape formatted cookies.txt file
Sourcepub fn noverify_ssl(self) -> Self
pub fn noverify_ssl(self) -> Self
Do not verify SSL certificates
Sourcepub fn user_agent(self, user_agent: &str) -> Self
pub fn user_agent(self, user_agent: &str) -> Self
Define user agent for session
pub fn basic_auth(self, user: &str, password: &str) -> Self
pub fn proxy(self, host: &str, port: &u16) -> Self
pub fn proxy_auth(self, user: &str, password: &str) -> Self
Sourcepub fn proxy_type(self, proxy_type: ProxyType) -> Self
pub fn proxy_type(self, proxy_type: ProxyType) -> Self
Define whether it’s a HTTP or SOCKS5 proxy
Trait Implementations§
Source§impl Default for HttpClientBuilder
impl Default for HttpClientBuilder
Source§fn default() -> HttpClientBuilder
fn default() -> HttpClientBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpClientBuilder
impl !RefUnwindSafe for HttpClientBuilder
impl Send for HttpClientBuilder
impl Sync for HttpClientBuilder
impl Unpin for HttpClientBuilder
impl !UnwindSafe for HttpClientBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more