Put and delete request 404 for json-server

< H2 > put and delete request 404 for json-server < / H2 >

get and post requests are normal. Router.json should be configured correctly
using postman request

router.json

 "/api/v1/:resource": "/:resource",
 "/api/v1/orders?id=:id": "/orders",

db.json

{
    "orders": [
        {
          "id": 10001,
          "orderId": 10001
        },
        {
          "id": 10002
        }
    ]
}   

clipboard.png

have any students encountered the same problem

Jul.16,2021

have you solved the same problem?


replace id=10001 directly with 10001

.
Menu