var xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log("excel download");
}
};
xhttp.open("POST", "exportGraphExcel", true);
xhttp.setRequestHeader("Content-type", "application/msexcel");
xhttp.send('graphName=graphakki');
Это дает статус 400 в браузере. Если тип содержимого изменен на «application/x-www-form-urlencoded», тогда запрос принимается.Обязательный параметр строки 'graphName' отсутствует
Это действительно вопрос? Что тогда ? –