perf: compress anime requests and reuse AniList search metadata
This commit is contained in:
+1
-5
@@ -88,11 +88,7 @@ impl Client {
|
||||
if response.body().mime_type() != Some("application/json") {
|
||||
return Err(invalid("AniList returned non-JSON content"));
|
||||
}
|
||||
let body = response
|
||||
.body_mut()
|
||||
.with_config()
|
||||
.limit(BODY_LIMIT)
|
||||
.read_to_string()
|
||||
let body = crate::read_catalog_body(response.body_mut(), BODY_LIMIT)
|
||||
.map_err(|_| invalid("AniList body unreadable, timed out, or exceeded 2 MiB"))?;
|
||||
decode(&body)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user