使用放入 angular js 的 http 更新 json 数据时出错?

Error when updating json data using http put in angular js?

为什么我会收到这个

PUT 文件:///C:/Users/User/Documents/Work/someapi/word/15 net::ERR_FILE_NOT_FOUND 当我更新时

$http({
    url: url + Id,
    method: "PUT", //update
    dataType: 'json',
    data: JSON.stringify({
      Id: '154',
      word: $scope.new,
      Date: new Date(),
    }),
    headers: {
      'Content-Type': 'application/JSON'
    }

  })
  .success(function(result) {
    console.log(result);
  })

我没有更新文件。很困惑。

请检查URL是否有效。确保您在 URL

中使用 http://,https://