lstprgrmr
lstprgrmr

Reputation: 21

How do i get the 304 status code with $http.get?

How do i get the 304 status code with $http.get ?

$http.get('menu.json').success(function(data, status, headers){
$scope.menu = data;
console.log(status); ## shows 200 but its actually 304 ##
});

Upvotes: 2

Views: 885

Answers (1)

Quentin
Quentin

Reputation: 943645

You cannot. XMLHttpRequest handles 3xx responses transparently, so the data you get is that of the original (cached) response.

Upvotes: 1

Related Questions