pub struct HttpClient { /* private fields */ }Expand description
HTTP client for the acquisition engine.
Implementations§
Source§impl HttpClient
impl HttpClient
Sourcepub async fn get(&self, url: &str, timeout_ms: u64) -> Result<HttpResponse>
pub async fn get(&self, url: &str, timeout_ms: u64) -> Result<HttpResponse>
Perform a single GET request with retry on 5xx and backoff on 429.
Falls back to HTTP/1.1 on protocol errors (some CDNs reject HTTP/2).
Sourcepub async fn post_form(
&self,
url: &str,
form_fields: &[(String, String)],
extra_headers: &[(String, String)],
timeout_ms: u64,
) -> Result<HttpResponse>
pub async fn post_form( &self, url: &str, form_fields: &[(String, String)], extra_headers: &[(String, String)], timeout_ms: u64, ) -> Result<HttpResponse>
POST form data (url-encoded) and return a response with all headers.
Unlike get(), this captures all response headers (not a filtered
subset), because callers like the auth module need set-cookie headers.
Trait Implementations§
Source§impl Clone for HttpClient
impl Clone for HttpClient
Source§fn clone(&self) -> HttpClient
fn clone(&self) -> HttpClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for HttpClient
impl !RefUnwindSafe for HttpClient
impl Send for HttpClient
impl Sync for HttpClient
impl Unpin for HttpClient
impl UnsafeUnpin 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