jaredcowing / wmsNewBooks

Small program to view list of new books by fund & date acquired using WorldShare Acquisitions API.
MIT License
2 stars 1 forks source link

Google Books API error #11

Open gjerdery opened 2 years ago

gjerdery commented 2 years ago

I recently discovered that cover images were not being saved to the db, and I found that the Google Books API was returning a 400 error when googleTransmit attempted to make the call.

Through trial and error, I discovered that the error was being triggered by the header set in line 671 of BookFeed.php, in particular the "GET" statement portion of the header. While it still worked to leave the "Accept: application/json" statement in the header, I've resolved this error by simply commenting out line 676 which sets the header within curl.

I'm not savvy enough at the moment to understand why the "GET" statement was included in the header, or why it would have just stopped working in late summer. Perhaps a character encoding issue?

jaredcowing commented 2 years ago

Good question, I'll take a look and see about removing that line if it didn't have a good reason to be there.