pub struct ReqwestHttpClient { /* private fields */ }Expand description
Default HTTP client implementation using reqwest.
Uses connection pooling for better performance.
Implementations§
Source§impl ReqwestHttpClient
impl ReqwestHttpClient
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new HTTP client with optimized settings.
Configures connection pooling with:
- 10 idle connections per host
- 60 second idle timeout
- 5 second request timeout (matching Node.js implementation)
- Custom User-Agent and default headers
Sourcepub fn with_client(client: Client) -> Self
pub fn with_client(client: Client) -> Self
Create with a custom reqwest::Client.
Trait Implementations§
Source§impl Clone for ReqwestHttpClient
impl Clone for ReqwestHttpClient
Source§fn clone(&self) -> ReqwestHttpClient
fn clone(&self) -> ReqwestHttpClient
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 moreSource§impl Default for ReqwestHttpClient
impl Default for ReqwestHttpClient
Source§impl HttpClient for ReqwestHttpClient
impl HttpClient for ReqwestHttpClient
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
url: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Perform a GET request. Read more
Source§fn get_with_query<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
query: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn get_with_query<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
query: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Perform a GET request with query parameters. Read more
Source§fn post<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
body: Vec<u8>,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn post<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
url: &'life1 str,
body: Vec<u8>,
content_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Perform a POST request with a body. Read more
Source§fn post_form<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
form: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn post_form<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
form: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, SteamError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Perform a POST request with form data. Read more
Perform a GET request carrying a raw
Cookie header value. Read morePerform a POST form request carrying a raw
Cookie header value. Read moreSource§impl HttpClient for ReqwestHttpClient
impl HttpClient for ReqwestHttpClient
fn get_with_query<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
url: &'life1 str,
query: &'life2 [(&'life3 str, &'life4 str)],
) -> Pin<Box<dyn Future<Output = Result<HttpResponse, CmError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Auto Trait Implementations§
impl Freeze for ReqwestHttpClient
impl !RefUnwindSafe for ReqwestHttpClient
impl Send for ReqwestHttpClient
impl Sync for ReqwestHttpClient
impl Unpin for ReqwestHttpClient
impl UnsafeUnpin for ReqwestHttpClient
impl !UnwindSafe for ReqwestHttpClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more