angrypchelka,
var xhr = new XMLHttpRequest();
xhr.open(method, url, true);
//xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if (xhr.readyState === 4 && xhr.status === 200) {
var type = xhr.getResponseHeader('Content-Type');
if (type.match(/^text/))
callback(xhr.responseText);
}
};
xhr.send();