[−][src]Function gen_epub_book::util::download_to
pub fn download_to<W: Write>(w: &mut W, what: &Url) -> Result<(), Error>
Download the contents of the specified URL to the specified output stream.
Examples
let mut buf = vec![]; assert_eq!(download_to(&mut buf, &Url::parse("https://www.uuidgenerator.net/api/version4").unwrap()), Ok(())); assert_eq!(buf.len(), "90772bc3-c7fd-4d3a-b88b-57d3122d3712\r\n".len());