Using the PUT method with Express.js

前端 未结 4 1594
轮回少年
轮回少年 2021-01-01 15:02

I\'m trying to implement update functionality to an Express.js app, and I\'d like to use a PUT request to send the new data, but I keep getting errors using PUT. From every

4条回答
  •  无人及你
    2021-01-01 15:36

    Your callback function has the arguments in the wrong order.

    Change the order of callback to function(req, res). Don't use function(res, req).

提交回复
热议问题