The following API endpoint returns an array of inspirational quotes in JSON format
You’re welcome to use it for your side projects to the HTTP GET request and display the results.
Usage examples:
JavaScript: Fetch API
fetch("https://type.fit/api/quotes")
.then(function(response) {
return response.json();
})
.then(function(data) {
console.log(data);
});
JQuery:
const settings = {
"async": true,
"crossDomain": true,
"url": "https://type.fit/api/quotes",
"method": "GET"
}
$.ajax(settings).done(function (response) {
const data = JSON.parse(response);
console.log(data);
});
Demo React application: https://quotes-react.netlify.app
Github repo: https://github.com/ssokurenko/quotes-react-app