Skip to content

Fix some of the Jikan entries not working - #69

Open
stefan9999991 wants to merge 2 commits into
Ervie:masterfrom
stefan9999991:fix/http2-and-encoding-issues
Open

Fix some of the Jikan entries not working#69
stefan9999991 wants to merge 2 commits into
Ervie:masterfrom
stefan9999991:fix/http2-and-encoding-issues

Conversation

@stefan9999991

Copy link
Copy Markdown

The Jikan api has been having issues for a few days now, and I found some improvements that makes entries work that didn't work before.

For example:
GET https://api.jikan.moe/v4/anime/38671 returns a 504 {"status":504,"type":"BadResponseException","message":"Jikan failed to connect to MyAnimeList. MyAnimeList may be down\\/unavailable or refuses to connect","error":null}

However,
GET https://api.jikan.moe/v4/anime/38671 with Accept-Encoding: gzip, deflate, br, zstd returns a 200 with a valid response.

After further testing, it is only this exact Accept-Encoding string that works. Changing the order or removing one of the encodings causes a 504 again.

Furthermore, some projects, like MALClient use Xamarin that automatically use HTTP/2.0, however Jikan doesn't support HTTP/2.0. That's why I also added an intercepter that forced requests to use HTTP/1.1, regardless of the used HttpClient

In my testing, these fixes caused 9/10 requests that failed before to work again, however still not all work. However, for now this makes the library a lot more usable again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant