角度错误中的http帖子 - 404未找到

时间:2016-10-07 14:05:41

标签: angularjs http http-post http-status-code-404

var dataObject = { 
    appId: $scope.appId 
}; 
$http({ 
    url: "/mockData/searchResults.json", 
    method: "POST", 
    params: dataObject, 
    headers: {'Content-Type': 'application/x-www-form-urlencoded'},     
}).success(function(data, status){ 
    $scope.results = data; 
}).error(function(data, status){ })

以下是网络中的错误

  

远程地址:127.0.0.1:9000
  请求网址:http://localhost:9000/mockData/searchResults.json?appId=546
  请求方法:POST
  状态代码:404未找到
  响应标头
  连接:保持活跃
  内容长度:51
  内容类型:text / html的;字符集= UTF-8
  日期:2016年10月7日星期五13:58:15 GMT
  X-Content-Type的选项:nosniff
  请求标题
  接受:application / json,text / plain, /
  Accept-Encoding:gzip,deflate
  接受语言:EN-US,EN; Q = 0.8
  连接:保持活跃
  内容长度:0
  主持人:本地主机:9000
  起源:http://localhost:9000
  引用者:http://localhost:9000/
  User-Agent:Mozilla / 5.0(Windows NT 6.1; WOW64)AppleWebKit / 537.36(KHTML,与Gecko一样)Chrome / 42.0.2311.152 Safari / 537.36
  查询字符串参数
  APPID:546

0 个答案:

没有答案
相关问题