pub async fn json_capped<T: DeserializeOwned>(
resp: Response,
max_bytes: usize,
) -> Result<T>Expand description
Convenience: fetch JSON with a hard body cap. Returns T on success,
or an error if the cap is exceeded / parsing fails.
pub async fn json_capped<T: DeserializeOwned>(
resp: Response,
max_bytes: usize,
) -> Result<T>Convenience: fetch JSON with a hard body cap. Returns T on success,
or an error if the cap is exceeded / parsing fails.