Crate reqwest_resume[−][src]
Wrapper that uses the Range
HTTP header to resume get requests.
It's a thin wrapper around reqwest
. It's a work in progress – wrapping functionality is copied across on an as-needed basis. Feel free to open a PR/issue if you need something.
Example
extern crate reqwest_resume; extern crate flate2; use std::io::{BufRead, BufReader}; let url = "http://commoncrawl.s3.amazonaws.com/crawl-data/CC-MAIN-2018-30/warc.paths.gz"; let body = reqwest_resume::get(url.parse().unwrap()).unwrap(); // Content-Encoding isn't set, so decode manually let body = flate2::read::MultiGzDecoder::new(body); for line in BufReader::new(body).lines() { println!("{}", line.unwrap()); }
Structs
Client |
A |
RequestBuilder |
A builder to construct the properties of a Request. |
Response |
A Response to a submitted Request. |
Traits
ClientExt |
Extension to |
Functions
get |
Shortcut method to quickly make a GET request. |