最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

无法使用postman投递到快递app

网站源码admin33浏览0评论

无法使用postman投递到快递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]
看到箭头,所以你可以删除那个箭头再试一次。

发布评论

评论列表(0)

  1. 暂无评论