JSFiddle - React, Tailwind, and code Playground

JavaScript

var a = function () {
    return $.ajax({
        url: "/echo/json/",
        type: "post",
        data: {
            json: JSON.stringify({
                a: true
            })
        },
        dataType: "json"
    });
}

a.done(function (data) {

    console.log(data);

});