Why is responseType
empty?
JavaScript
var xhr = new XMLHttpRequest();
xhr.open(method,url,true);
xhr.onreadystatechange = function()
{
if (xhr.readyState=='4')
{
if (xhr.status==200)
{
console.log(xhr.responseType);//[empty]
}
}
}
PHP
header('Content-Type: application/json');
//[Validated JSON Data]
No frameworks.