mirror of
https://github.com/Kong/insomnia.git
synced 2026-10-27 00:59:18 -04:00
16 lines
330 B
JavaScript
Executable File
16 lines
330 B
JavaScript
Executable File
var data = null;
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
xhr.withCredentials = true;
|
|
|
|
xhr.addEventListener('readystatechange', function() {
|
|
if (this.readyState === this.DONE) {
|
|
console.log(this.responseText);
|
|
}
|
|
});
|
|
|
|
xhr.open('POST', 'http://mockbin.com/har');
|
|
xhr.setRequestHeader('cookie', 'foo=bar; bar=baz');
|
|
|
|
xhr.send(data);
|