pub struct HttpClientAdapter { /* private fields */ }
Implementations§
Source§impl HttpClientAdapter
impl HttpClientAdapter
pub fn new(client: HttpClient) -> Self
Trait Implementations§
Source§impl HttpProviderSafe for HttpClientAdapter
impl HttpProviderSafe for HttpClientAdapter
Source§fn get_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a GET request returning JSON
Source§fn post_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
body: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn post_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
body: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a POST request with JSON body
Source§fn put_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
body: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn put_json<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 str,
body: Value,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Execute a PUT request with JSON body
Auto Trait Implementations§
impl Freeze for HttpClientAdapter
impl !RefUnwindSafe for HttpClientAdapter
impl Send for HttpClientAdapter
impl Sync for HttpClientAdapter
impl Unpin for HttpClientAdapter
impl !UnwindSafe for HttpClientAdapter
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> HttpProviderExt for Twhere
T: HttpProviderSafe + ?Sized,
impl<T> HttpProviderExt for Twhere
T: HttpProviderSafe + ?Sized,
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: Sync + '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: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get with type conversion
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>>
Post with type conversion