AngularJS Web API - IE 不 post Form body
AngularJS Web API - IE does not post Form body
当我在 angular JS(使用 IE 11)中执行 http post 时,OAuthValidateClientAuthenticationContext
表单主体不包含任何ValidateClientAuthentication
处的数据。
请注意,这与 Chrome 和 Firefox 完美配合。如果我打开调试器并切换到 IE 9,它可以工作,但是当我关闭调试器时,它会切换到 IE 11 并停止工作。
任何想法表示赞赏!
//sample code
var data = "grant_type=password&username=john&password=mYpass10&client_id=self"
this.$http.post('/token',
data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
.success(function(response: any) {})
.error(function(err, status) {});
将以下内容添加到您的页面是否可以解决问题?
<meta http-equiv="x-ua-compatible" content="IE=9" >
这显然是 Microsoft 正在调查的一个错误。查看更多信息:
http://blog.yorkxin.org/posts/2014/02/06/ajax-with-formdata-is-broken-on-ie10-ie11/
Why is IE 10 Refusing to send POST data via jQuery $.ajax
当我在 angular JS(使用 IE 11)中执行 http post 时,OAuthValidateClientAuthenticationContext
表单主体不包含任何ValidateClientAuthentication
处的数据。
请注意,这与 Chrome 和 Firefox 完美配合。如果我打开调试器并切换到 IE 9,它可以工作,但是当我关闭调试器时,它会切换到 IE 11 并停止工作。
任何想法表示赞赏!
//sample code
var data = "grant_type=password&username=john&password=mYpass10&client_id=self"
this.$http.post('/token',
data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' } })
.success(function(response: any) {})
.error(function(err, status) {});
将以下内容添加到您的页面是否可以解决问题?
<meta http-equiv="x-ua-compatible" content="IE=9" >
这显然是 Microsoft 正在调查的一个错误。查看更多信息:
http://blog.yorkxin.org/posts/2014/02/06/ajax-with-formdata-is-broken-on-ie10-ie11/
Why is IE 10 Refusing to send POST data via jQuery $.ajax