Angular.min.js has a 500 error solution in the post method on the iis service

The reason is that the Content-Type of the request is different. Just modify it.

a.module("login", [], function($httpProvider) {
  // 修改请求Content-Type 只需要修改或者添加这个function就可以
  $httpProvider.defaults.headers.post['Accept'] = 'application/json, text/javascript, */*;';
  $httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded;charset=utf-8';

})

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325818658&siteId=291194637