AdenForshaw/theCatAPI-website

Help with API access code

Opened this issue · 1 comments

Playing with the jQuery example and wondering how I would add and utilize my API access code in that example?
Thanks

Hello, you need to set the header before sending the request. The example uses XMLHttpRequest, so
XMLHttpRequest.setRequestHeader('x-api-key', 'x-api-key-value') should work.