pub struct HttpClientBuilder { /* private fields */ }Expand description
HTTP client builder for configuring proxy and TLS settings
Implementations§
Source§impl HttpClientBuilder
impl HttpClientBuilder
Sourcepub fn danger_accept_invalid_certs(self, accept: bool) -> HttpClientBuilder
pub fn danger_accept_invalid_certs(self, accept: bool) -> HttpClientBuilder
Accept invalid TLS certificates (non-WASM only)
Sourcepub fn proxy(self, url: Url) -> HttpClientBuilder
pub fn proxy(self, url: Url) -> HttpClientBuilder
Set a proxy URL (non-WASM only)
Sourcepub fn proxy_with_matcher(
self,
url: Url,
pattern: &str,
) -> Result<HttpClientBuilder, HttpError>
pub fn proxy_with_matcher( self, url: Url, pattern: &str, ) -> Result<HttpClientBuilder, HttpError>
Set a proxy URL with a host pattern matcher (non-WASM only)
Sourcepub fn build(self) -> Result<HttpClient, HttpError>
pub fn build(self) -> Result<HttpClient, HttpError>
Build the HTTP client
Trait Implementations§
Source§impl Debug for HttpClientBuilder
impl Debug for HttpClientBuilder
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 UnsafeUnpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request