快递app"/>
无法使用postman投递到快递app
我的节点应用程序中有以下代码:
// POST route
app.post('/bb', async (req, res) => {
try {
// Assuming you're receiving JSON data in the request body
const newData = await req;
// Process the new data here
console.log('Received new data:', newData);
res.status(200).json({ message: 'Data received successfully' });
} catch (err) {
res.status(500).json({ error: err.message });
}
});
app.listen(3000, () => console.log('Server started on port 3000'));
当我尝试用 Postman 向它发送一些 json 时,我得到:
Cannot POST /bb%0A
我做错了什么?
回答如下:我在邮递员的最后一个网址
http://localhost:3000/bb[arrow]
看到箭头,所以你可以删除那个箭头再试一次。
更多推荐
无法使用postman投递到快递app
发布评论