pub struct HttpConfig {
pub user_agent: String,
pub timeout: Duration,
pub headers: Vec<(String, String)>,
pub proxy: Option<String>,
pub max_redirects: usize,
pub basic_auth: Option<(String, String)>,
}Fields§
§user_agent: String§timeout: DurationApplies to connect and to the gap between two body reads. It is deliberately not a whole-request deadline: a 4 GiB range is allowed to take as long as it takes, as long as bytes keep arriving.
headers: Vec<(String, String)>§proxy: Option<String>§max_redirects: usize§basic_auth: Option<(String, String)>Implementations§
Source§impl HttpConfig
impl HttpConfig
Sourcepub fn header_map(&self) -> Result<HeaderMap>
pub fn header_map(&self) -> Result<HeaderMap>
Extra headers as a HeaderMap, rejecting anything unparseable rather
than silently dropping it.
Trait Implementations§
Source§impl Clone for HttpConfig
impl Clone for HttpConfig
Source§fn clone(&self) -> HttpConfig
fn clone(&self) -> HttpConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpConfig
impl Debug for HttpConfig
Auto Trait Implementations§
impl Freeze for HttpConfig
impl RefUnwindSafe for HttpConfig
impl Send for HttpConfig
impl Sync for HttpConfig
impl Unpin for HttpConfig
impl UnsafeUnpin for HttpConfig
impl UnwindSafe for HttpConfig
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