pub struct HttpConfig {
pub http2: bool,
pub host: Option<String>,
pub content_type: String,
}Expand description
HTTP settings for http:// endpoints, set with
ClientBuilder::http_config.
Fields§
§http2: boolUse HTTP/2 over plain TCP (prior knowledge, no upgrade) instead of
HTTP/1.1. One connection is opened in build() and shared by all
calls. A QUIC config (HTTP/3) takes priority.
host: Option<String>Host header for HTTP/1.1 requests. Not sent when None.
content_type: StringContent-Type of the requests. Set it to match a custom codec.
Defaults to application/json.
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