var x = function () { var xhr = new XMLHttpRequest(); xhr.onreadystatechange = function () { if (xhr.readyState == 4) { Vesta.log(xhr.status); } }; xhr.open('POST', Config.svcUrl, true); xhr.send(payload.toJSONString()); } x();