Skip to main content

fetch_bytes

Function fetch_bytes 

Source
pub fn fetch_bytes(url: &str, max_size: u64) -> Result<Vec<u8>, ForgeError>
Expand description

Fetch url into memory, capped by max_size.

Content-Length is checked before reading when present; the buffered body is checked again after reading (covers chunked responses without a declared length). Redirects are limited to 5; total timeout is 120 s, connect timeout 30 s (DESIGN.md ยง8.4).