Skip to main content

http_get_bytes

Function http_get_bytes 

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

Plain HTTP GET of an absolute URL: returns the response body bytes verbatim. Non-2xx responses are errors carrying the status and the (lossily decoded) body, that keeps a backend error page from ever being stored as file content.

ยงErrors

Transport failures and non-2xx statuses both map to HybridStorageError::IoError / HybridStorageError::UploadFailed.