JSFiddle - React, Tailwind, and code Playground

by abdul qodir

HTML

<body>
<button type="button" onclick="loadXMLDoc()">Change Content</button>
</body>

JavaScript

function loadXMLDoc() {
var http = new XMLHttpRequest();
var url = "https://alapp.relevantmobile.com/api/v1/push_services/submit_skip_auth?";
var params = "[email protected]&chain_id=70&service_type=1&select_type=manual_enter&user_ids=350427&point=11&year=2016&month=11&day=29&hour=01&minute=01&time_zone_default=EST";
http.open("POST", url, true);

//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");

http.setRequestHeader("Authorization", "Basic YWRtaW46cmVsMTIzNDU=");
http.onreadystatechange = function() {//Call a function when the state changes.
    if(http.readyState == 4 && http.status == 200) {
        alert(http.responseText);
    }
}
http.send(params);
  }