pub struct ReqwestClient { /* private fields */ }Expand description
HttpClient on top of reqwest.
Implementations§
Source§impl ReqwestClient
impl ReqwestClient
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a client with the default reqwest settings.
It first installs the crypto provider chosen by the TLS features, see
install_crypto_provider.
Sourcepub fn from_client(client: Client) -> Self
pub fn from_client(client: Client) -> Self
Uses a configured reqwest client (timeouts, proxy, …).
Trait Implementations§
Source§impl Clone for ReqwestClient
impl Clone for ReqwestClient
Source§impl Debug for ReqwestClient
impl Debug for ReqwestClient
Source§impl Default for ReqwestClient
impl Default for ReqwestClient
Source§impl HttpClient for ReqwestClient
impl HttpClient for ReqwestClient
Source§fn send<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
request: HttpRequest,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, HttpError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Sends the request and reads the whole response. A response with an error status is
still
Ok; only failures to send or read are errors.Auto Trait Implementations§
impl !RefUnwindSafe for ReqwestClient
impl !UnwindSafe for ReqwestClient
impl Freeze for ReqwestClient
impl Send for ReqwestClient
impl Sync for ReqwestClient
impl Unpin for ReqwestClient
impl UnsafeUnpin for ReqwestClient
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