Struct sfo_http::http_util::HttpClient
source · pub struct HttpClient { /* private fields */ }Implementations§
source§impl HttpClient
impl HttpClient
pub fn new(max_connections: usize, base_url: Option<&str>) -> Result<Self>
pub fn new_with_no_cert_verify( max_connections: usize, base_url: Option<&str> ) -> Result<Self>
pub async fn get_json<T: for<'de> Deserialize<'de>>( &self, uri: &str ) -> Result<T>
pub async fn get(&self, uri: &str) -> Result<(Vec<u8>, Option<String>)>
pub async fn post_json<T: for<'de> Deserialize<'de>, P: Serialize>( &self, uri: &str, param: &P ) -> Result<T>
pub async fn post( &self, uri: &str, param: Vec<u8>, content_type: Option<&str> ) -> Result<(Vec<u8>, Option<String>)>
Trait Implementations§
source§impl Clone for HttpClient
impl Clone for HttpClient
source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a copy 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 !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl !UnwindSafe for HttpClient
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