let client = new XMLHttpRequest();
client.open("POST", "{MYURL}", true);
client.send(JSON.stringify(data));
client.onreadystatechange = function () {
if (this.readyState === this.HEADERS_RECEIVED) {
console.log(client.getAllResponseHeaders().toLowerCase());
}
};
Can we do it somehow using Bluebird?