JSFiddle - React, Tailwind, and code Playground
JavaScript
$.getJSON('/foo/bar.json')
.done(function() { alert('request successful'); })
.fail(function() { alert('request failed'); });
$.getJSON('/foo/bar.json')
.done(function() { alert('request successful'); })
.fail(function() { alert('request failed'); });