JSFiddle - React, Tailwind, and code Playground
JavaScript
function getData() {
$.ajax({
url : 'http://headers.jsontest.com/',
type: 'GET',
success : handleData
})
}
function handleData(response){
defaults = response;
console.log(defaults);
}
getData() ;