httpsnippet
Version:
HTTP Request snippet generator for *most* languages
12 lines (11 loc) • 337 B
JavaScript
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('GET', 'http://mockbin.com/har?foo%5Bbar%5D=baz%2Czap&fiz=buz&key=value');
xhr.send(data);
;