JSFiddle - React, Tailwind, and code Playground
JavaScript
$.ajax("/echo/json/", {xhrFields: {withCredentials: true}})
.done(function() {
alert("success");
})
.fail(function() {
alert("error");
})
$.ajax("/echo/json/", {xhrFields: {withCredentials: true}})
.done(function() {
alert("success");
})
.fail(function() {
alert("error");
})