let xhr = new XMLHttpRequest()
xhr.open('get', 'xxx', true)
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) {
if (xhr.status >=200 && xhr.status < 300 || xhr.status == 304) {
console.log('xhr.responseText', xhr.responseText)
} else {
console.log('unsuccessful: ', xhr.status)
}
}
}
xhr.send(null)