Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly pass nil body to http.NewRequest
The integration tests revealed that AnimeService.List and MangaService.List started receiving a 411 Length required error from the MyAnimeList API. Both methods use mal.Client.NewRequest to create API requests. This is probably related to golang/go#18117 and it happened because when using http.NewRequest (inside mal.Client.NewRequest) with GET, the body argument was not nil as it should. This commit ensures that nil body is properly passed to http.NewRequest when mal.Client.NewRequest has no data to encode.
- Loading branch information