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?
Check whether the URL path of the resource request is written incorrectly
Check if the id has not been obtained?
Suppose you have this API
api/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?