pub struct HttpClient { /* private fields */ }
Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new(proxy_url: Option<&Url>) -> Self
pub async fn request(&self, req: Request<Body>) -> Result<Response<Body>, Error>
pub async fn request_body(&self, req: Request<Body>) -> Result<Bytes, Error>
pub fn request_stream( &self, req: Request<Body>, ) -> Result<IntoStream<ResponseFuture>, Error>
pub fn request_fut(&self, req: Request<Body>) -> Result<ResponseFuture, Error>
pub fn get_retry_after(headers: &HeaderMap<HeaderValue>) -> Option<Duration>
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