pub struct HttpClient { /* private fields */ }Expand description
HTTP client: one Agent (connection reuse), bounded concurrent requests.
Implementations§
Source§impl HttpClient
impl HttpClient
pub fn new(max_concurrent: usize) -> Self
Sourcepub fn get_with_accept(
&self,
url: &str,
accept: Option<&str>,
) -> Result<Vec<u8>, String>
pub fn get_with_accept( &self, url: &str, accept: Option<&str>, ) -> Result<Vec<u8>, String>
GET url with optional Accept header (e.g. for abbreviated packument).
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