pub struct HttpClientWithProvider { /* private fields */ }
Expand description
Extended HttpClient with HttpProvider implementation
Implementations§
Trait Implementations§
Source§impl HttpProvider for HttpClientWithProvider
impl HttpProvider for HttpClientWithProvider
Source§fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait, T>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>where
T: DeserializeOwned + Send + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a GET request
Source§fn post<'life0, 'life1, 'life2, 'async_trait, T, B>(
&'life0 self,
path: &'life1 str,
body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
fn post<'life0, 'life1, 'life2, 'async_trait, T, B>( &'life0 self, path: &'life1 str, body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
Execute a POST request with JSON body
Source§fn put<'life0, 'life1, 'life2, 'async_trait, T, B>(
&'life0 self,
path: &'life1 str,
body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
fn put<'life0, 'life1, 'life2, 'async_trait, T, B>( &'life0 self, path: &'life1 str, body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
Execute a PUT request with JSON body
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a DELETE request
Source§fn post_binary<'life0, 'life1, 'life2, 'async_trait, B>(
&'life0 self,
path: &'life1 str,
body: &'life2 B,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
fn post_binary<'life0, 'life1, 'life2, 'async_trait, B>( &'life0 self, path: &'life1 str, body: &'life2 B, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
Execute a POST request that returns binary data
Source§fn set_session_token(&mut self, token: Option<String>)
fn set_session_token(&mut self, token: Option<String>)
Set the session token for authenticated requests
Source§fn set_timeout(&mut self, _timeout: Duration)
fn set_timeout(&mut self, _timeout: Duration)
Set the request timeout
Source§fn last_response_metadata(&self) -> Option<ResponseMetadata>
fn last_response_metadata(&self) -> Option<ResponseMetadata>
Get response metadata for the last request (optional)
Auto Trait Implementations§
impl Freeze for HttpClientWithProvider
impl !RefUnwindSafe for HttpClientWithProvider
impl Send for HttpClientWithProvider
impl Sync for HttpClientWithProvider
impl Unpin for HttpClientWithProvider
impl !UnwindSafe for HttpClientWithProvider
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