screenshot of network logI have written a XMLHttp request POST method in place of form post.
While debugging it's working fine and not showing any error, but not hitting the URL as well.
var http = new XMLHttpRequest();
var url = "https://localhost:8083/unique/test";
var params = finalJSON;
http.open("POST", url, true);
http.setRequestHeader("Content-type", "application/json; charset=utf-8");
http.onreadystatechange = function() {
if(http.readyState == 4 && http.status == 200) {
alert(http.responseText);
}
}
http.send(params);
Here finalJSON is my JSON which contains data like this:
{"ID": "1234", "AMOUNT": "10000", "TXNTYPE": "abc", "CURRENCY_CODE": "123"}
Not able to find the problem, please help what is missing why URL is not hitting?
I took the reference from this XMLHttps post request Reference
I also attached screenshot of network log , in it request is going but there is no response.