문제

I try to send a request to my server, which contains a data with Json (keys and values).

I see that when I choose the GET method in postman, there is no option to add the data.

Here what I want to check in the server side:

app.get('/downloadWithJson', function(req, res){
  var parseJson = qs.parse(req);
  console.log('static file request : ' + parseJson.fileName);
});

How can I check it?

도움이 되었습니까?

해결책

yes you can send json to your web api's using post method by including Content-Type key in request header and setting it to application/json.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top