pub struct HttpSender { /* private fields */ }
Implementations§
Source§impl HttpSender
impl HttpSender
pub fn new<T: AsRef<str>>(url: T) -> Self
Sourcepub async fn send(&mut self, request: HttpRequest) -> Result<HttpResponse>
pub async fn send(&mut self, request: HttpRequest) -> Result<HttpResponse>
Send a request to the url.
Host header will be set automatically on the request from the url.
Auto Trait Implementations§
impl Freeze for HttpSender
impl RefUnwindSafe for HttpSender
impl Send for HttpSender
impl Sync for HttpSender
impl Unpin for HttpSender
impl UnwindSafe for HttpSender
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