pub struct HttpRequest { /* private fields */ }Implementations§
Source§impl HttpRequest
impl HttpRequest
pub fn with_header(self, name: &'static str, value: impl AsRef<str>) -> Self
pub fn set_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_raw_with_headers( self, ) -> Result<(String, HeaderMap<HeaderValue>)>
pub async fn send_with_retry<T>(self, max_retries: u32) -> Result<T>where
T: DeserializeOwned,
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 HttpRequest
impl !RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin for HttpRequest
impl !UnwindSafe for HttpRequest
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