pub struct HttpClient<I: Interceptor> { /* private fields */ }Implementations§
Source§impl<X: Interceptor> HttpClient<X>
impl<X: Interceptor> HttpClient<X>
pub async fn get<R, P>(&self, path: P) -> Result<R, Error>
pub async fn get_with_params<R, P, I, K, V>(
&self,
path: P,
params: I,
) -> Result<R, Error>where
R: DeserializeOwned + Send + 'static,
P: IntoIterator,
P::Item: AsRef<str>,
I: IntoIterator,
I::Item: Borrow<(K, V)>,
K: AsRef<str>,
V: AsRef<str>,
Source§impl HttpClient<NoInterceptor>
impl HttpClient<NoInterceptor>
pub fn new<U>(base_url: U) -> Result<HttpClient<NoInterceptor>, UrlParseError>
Source§impl<X: Interceptor> HttpClient<X>
impl<X: Interceptor> HttpClient<X>
pub fn with_interceptor<O>(self, interceptor: O) -> HttpClient<O>where
O: Interceptor,
pub fn set_default_headers<H, K, V>(&mut self, headers: H)
Source§impl<X: Interceptor> HttpClient<X>
impl<X: Interceptor> HttpClient<X>
Source§impl<X: Interceptor> HttpClient<X>
impl<X: Interceptor> HttpClient<X>
pub fn new_request<P>(&self, path: P) -> Request
pub fn new_request_with_params<P, I, K, V>(&self, path: P, params: I) -> Request
pub fn new_request_with_url<U>(&self, url: U) -> Result<Request, UrlParseError>
Auto Trait Implementations§
impl<I> Freeze for HttpClient<I>where
I: Freeze,
impl<I> RefUnwindSafe for HttpClient<I>where
I: RefUnwindSafe,
impl<I> Send for HttpClient<I>where
I: Send,
impl<I> Sync for HttpClient<I>where
I: Sync,
impl<I> Unpin for HttpClient<I>where
I: Unpin,
impl<I> UnsafeUnpin for HttpClient<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for HttpClient<I>where
I: UnwindSafe,
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