HI there, thanks so much for making the Cats Api. I have a problem with the API not returning pagination headers.
My code first calls https://api.thecatapi.com/v1/breeds. I pass the API key that I obtained from you and no query params. The API call returns the 3 pagination headers successfully.
Next, again using my own API key, the code calls https://api.thecatapi.com/v1/images/search limit=8&page=0&order=DESC&. No pagination headers are returned. I don’t understand why this is the case, because it looks like the API request is correctly formed.
If I change my code to use DEMO-API-KEY in place of my API key, then the /images/search call works as expected, returning the 3 pagination headers.
Good find on the lack of PAgination headers when authenticating via an api_key - it looks like the Pagination headers are only returned if the api_key / x-api-key is valid. If it is not then no pagination headers are returned
I completely agree. The API will throw an error if you try to write any data to your account with an Invalid key, or GET ./images, ./facts ./jokes ./votes or ./favourites - however with the GET ./images/search endpoint it does not
I’ll add it to the list for the next release - thanks for the feedback, it’s always appreciated