pub struct HttpProviderClient { /* private fields */ }Implementations§
Source§impl HttpProviderClient
impl HttpProviderClient
pub fn new( timeout: Duration, base_url: Option<String>, default_base: &str, headers: &HashMap<String, String>, auth: AuthStrategy, ) -> Result<Self, ProviderError>
pub async fn post_json<TReq: Serialize, TResp: DeserializeOwned>( &self, path: &str, body: &TReq, ) -> Result<TResp, ProviderError>
pub async fn post_json_raw<TReq: Serialize>( &self, path: &str, body: &TReq, ) -> Result<Response, ProviderError>
pub async fn post_multipart( &self, path: &str, form: Form, ) -> Result<Response, ProviderError>
pub async fn get_json<TResp: DeserializeOwned>( &self, path: &str, ) -> Result<TResp, ProviderError>
Trait Implementations§
Source§impl Clone for HttpProviderClient
impl Clone for HttpProviderClient
Source§fn clone(&self) -> HttpProviderClient
fn clone(&self) -> HttpProviderClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpProviderClient
impl !RefUnwindSafe for HttpProviderClient
impl Send for HttpProviderClient
impl Sync for HttpProviderClient
impl Unpin for HttpProviderClient
impl !UnwindSafe for HttpProviderClient
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