display a list of productsDELETE /api/cart/:idto delete an item from the cart 现在,我希望能够向购物车添加一个商品,当然,使用POST方法,它应该是: /api/cart >> and pass the item idin the body, so req.bo
我正在构建网络应用程序来跟踪棒球players.The,目前只有与球员相关的数据属性是fName和lName。我使用的是Node.js快递4,猫鼬和翡翠。我有get请求正常运行,当您单击一个播放器,它将带您到localhost:3000/ player /:id与球员的信息正确地加载到视图,我的post方法有问题,并让它实际上更新球员信息提交。下面是get请求的代码,该请求似乎运行正常: