pub struct NativeHttpClient { /* private fields */ }Expand description
Native HTTP client using reqwest.
Implementations§
Trait Implementations§
Source§impl Default for NativeHttpClient
Available on crate feature native only.
impl Default for NativeHttpClient
Available on crate feature
native only.Source§impl HttpClient for NativeHttpClient
impl HttpClient for NativeHttpClient
Source§fn request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 str,
headers: &'life3 HashMap<String, String>,
body: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn request<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
method: &'life1 str,
url: &'life2 str,
headers: &'life3 HashMap<String, String>,
body: Option<&'life4 [u8]>,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Send an HTTP request with the given method, URL, headers, and optional body.
Source§fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send an HTTP GET request.
Source§fn post<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 HashMap<String, String>,
body: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn post<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
url: &'life1 str,
headers: &'life2 HashMap<String, String>,
body: &'life3 [u8],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, Box<dyn Error + Send + Sync>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Send an HTTP POST request with a body.
Auto Trait Implementations§
impl Freeze for NativeHttpClient
impl !RefUnwindSafe for NativeHttpClient
impl Send for NativeHttpClient
impl Sync for NativeHttpClient
impl Unpin for NativeHttpClient
impl UnsafeUnpin for NativeHttpClient
impl !UnwindSafe for NativeHttpClient
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