我有一个$ http.get()的AngularJS调用。在浏览器中可以正常使用CORS。 我有一个$ http.post()的AngularJS调用。只有当我将Content-Type头设置为“application/x-www-form-urlencoded”时才有效。在浏览器中可以正常使用CORS。
我有一个$ http.put()的AngularJS调用。我试图将Content-Type标题设置为“/”通配符,但它不适用于Firefox 36+和Chrome 36+。它给了我一个CORS Blocked。它在IEx11中工作正常
是否有$ http.put()的特定标头,或者这是FF/Chrome的问题?
$阿贾克斯({ 类型: '把', 网址:remoteURL, 数据类型:“ json“, contentType:”application/x-www-form-urlencoded“, processData:false, data:json, success:function(msg){ alert('Success'); }, error:function(data,errorThrown){ alert('Error'); } }); – user1410990 2015-03-02 20:26:38
在IE中,但不是在FF /铬 – user1410990 2015-03-02 20:28:29
$ http.put( remoteURL, 数据 ) .success(功能(数据,状态,响应){ 警报( 'OK'); }) 。错误(函数(数据,状态,配置){alert('Error'); }); – user1410990 2015-03-02 20:28:54