Skip to content Skip to sidebar Skip to footer

How To Load A Cross-domain Json With $http In Angularjs 1.0.8 As It Does With 1.2.0

Using Angular 1.0.8 I was trying to load a JSON from a server that doesn't support get OPTIONS, and consequently got a error. Demo for 1.0.8 OPTIONS http://www.json-generator.com/j

Solution 1:

Try this:

delete $http.defaults.headers.common['X-Requested-With'];

I added that line before the call to $http and it worked in your 1.0.8 plunker.

Post a Comment for "How To Load A Cross-domain Json With $http In Angularjs 1.0.8 As It Does With 1.2.0"