Pregunta

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?

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top