Pre-AJAX Flow - refreshes the page whenever a request is made. Doesn’t allow any user interaction while request is happening.
AJAX Flow - makes a request asynchronously and allows user interaction with other parts of the webpage while request is loading. Doesn’t cause a refresh
Uses this API: https://jservice.xyz/
Fetches an image from an external API, “https://api.thecatapi.com/v1/images/search?size=small”, that returns information on a random cat image url.
If it doesn’t succeed, it returns an error message.
Increments the score of the current kitten by 1 and returns the current score.
Decrements the score of the current kitten by 1 and returns the current score.
Creates a new comment for the current kitten.
Send a comment.
Returns all the comments of the kitten in the order that they were created.