Wie bekomme ich 304 von jQuery Ajax statt 200?
Meine Dienste geben a zurück304
aber jQuery Ajax scheint es zu konvertieren200 OK
Ergebnis.
Das ist meine Bitte:
<code>$.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 } } }); </code>
Mit Fiddler kann ich sehen, dass der Dienst zurückkehrt304
korrekt.
Warum konvertiert jQuery es in a200
?