mirror of
https://github.com/Kong/insomnia.git
synced 2026-04-22 23:28:33 -04:00
16 lines
339 B
JavaScript
Executable File
16 lines
339 B
JavaScript
Executable File
var data = 'Hello World';
|
|
|
|
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('content-type', 'text/plain');
|
|
|
|
xhr.send(data);
|