邮递员-发布应用程序/json数据 [英] postman - post application/json data
本文介绍了邮递员-发布应用程序/json数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何通过邮递员发送应用程序/json数据,以便我可以在nodejs服务器中接收与req.body相同的数据. 我曾在邮递员中尝试过将原始的json文件发送为application/json,但数据在服务器中以req.rawBody的形式提供.我需要在req.body中得到相同的结果.有没有这样的选择
How can I send application/json data through postman, so that i can recieve the same data in nodejs server as req.body. I have tried raw body json in postman which sends the data as application/json, but data is available in server as req.rawBody. I need to get the same in req.body. Is there any such option
推荐答案
单击x-www-form-urlencoded标签,然后输入正文.现在,您可以在后端使用req.body
接收正文了.
Click on x-www-form-urlencoded tab and enter the body. Now you can receive the body using req.body
in backend.
这篇关于邮递员-发布应用程序/json数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文