search

Home  >  Q&A  >  body text

angular.js - 新手问题: $resource定义url的问题

我就直接上图吧!

新手,求大神解答!感激不尽。

曾经蜡笔没有小新曾经蜡笔没有小新2745 days ago597

reply all(3)I'll reply

  • 漂亮男人

    漂亮男人2017-05-15 17:04:01

    Check whether the URL path of the resource request is written incorrectly

    reply
    0
  • 某草草

    某草草2017-05-15 17:04:01

    Check if the id has not been obtained?

    reply
    0
  • 某草草

    某草草2017-05-15 17:04:01

    Suppose you have this APIapi/regions/:id,真的是PUT方法,那你在浏览器里直接访问http://localhost:3000/api/regions/某一个ID,服务器肯定不允许。因为浏览器里URL形式访问是GET method.

    Secondly, the API in the first picture is api/regions/:id,这里有:id。第二张图里浏览器里访问的是http://localhost:3000/api/regions,没有id. The two seem to have nothing to do with each other, so what do you want to ask?

    reply
    0
  • Cancelreply