Skip to main content

fetch

Function fetch 

Source
pub fn fetch(url: &str) -> Result<Vec<u8>, String>
Expand description

Download url (or read a local path or file:// URL). Downloads give up on a connection after 30s and on a response that sends nothing for http_timeout (no total limit, so a slow but healthy download finishes), and are tried 3 times on connection errors, timeouts, 429 (honouring Retry-After) and 5xx.