Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试向我的服务器发送一个请求,其中包含带有 Json 的数据(键和值)。
我看到当我在postman中选择GET方法时,没有添加数据的选项。
这是我想在服务器端检查的内容:
app.get('/downloadWithJson', function(req, res){ var parseJson = qs.parse(req); console.log('static file request : ' + parseJson.fileName); });
我怎样才能检查它?
是的,您可以通过在请求标头中包含 Content-Type 键并将其设置为 application/json 来使用 post 方法将 json 发送到您的 web api。