私のサービスはを返しますが304
、jQueryAjaxはそれを200 OK
結果に変換しているようです。
これは私の要求です:
$.ajax({
url: '/api/items',
type: 'GET',
dataType: 'json',
contentType: 'application/json',
ifModified:true,
cache: false,
statusCode: {
304: function() {
alert("not modified"); // does not fire
}
},
complete: function (xhr, status) {
console.log(xhr.status); // 200
}
}
});
304
Fiddlerを使用すると、サービスが正しく返されることがわかります。
jQueryがそれをに変換するのはなぜ200
ですか?