pub struct HttpClient {
pub client: ClientWithMiddleware,
pub cookies: Arc<CookieStoreMutex>,
}Fields§
§client: ClientWithMiddlewareImplementations§
Source§impl HttpClient
impl HttpClient
pub fn new() -> Result<HttpClient>
pub async fn download_file( &self, url: &str, path: &str, ) -> Result<usize, DownloadError>
pub async fn fetch_text(&self, url: &str) -> Result<String, DownloadError>
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