pub struct HttpClient { /* private fields */ }Implementations§
Source§impl HttpClient
impl HttpClient
pub fn with_header(self, name: &'static str, value: impl AsRef<str>) -> Self
pub fn with_body<B: Serialize>(self, body: B) -> Result<Self>
pub fn with_raw_body(self, body: String) -> Self
pub async fn send<T>(self) -> Result<T>where
T: DeserializeOwned,
pub async fn send_raw(self) -> Result<String>
pub async fn send_with_retry<T>(self, max_retries: u32) -> Result<T>where
T: DeserializeOwned,
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
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 moreSource§impl Debug for HttpClient
impl Debug for HttpClient
Source§impl Default for HttpClient
impl Default for HttpClient
Source§fn default() -> HttpClient
fn default() -> HttpClient
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for HttpClient
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