Using Angular 1.0.8, I tried to download JSON from a server that does not support get OPTIONS, and therefore received an error.
Demo for version 1.0.8
OPTIONS http://www.json-generator.com/j/cdnueRTRmG 405 (Method Not Allowed) OPTIONS http://www.json-generator.com/j/cdnueRTRmG Origin http://run.plnkr.co is not allowed by Access-Control-Allow-Origin. XMLHttpRequest cannot load http://www.json-generator.com/j/cdnueRTRmG. Origin http://run.plnkr.co is not allowed by Access-Control-Allow-Origin.
I tried updating Angular to 1.2.0-RC and the error went away.
Demo for 1.2.0
This is exactly the same code, the fork that downloads the new version of angular, in fact the code is almost the same as you can find in $ http angularjs docs .
How can I fix this problem using v1.0.8?
I read some tips on removing headers from the request , but could not do this work on the sample code above.
a - m source share