Answer the question
In order to leave comments, you need to log in
How to send a post request to Node.js?
var request = require('request');
request.post({
url: '*',
headers: {
'content-type': 'application/json',
},
body: {
page: 1,
size: 5,
color: 7
}
function optionalCallback(err, httpResponse, body) {
console.log(body)
}
})
Answer the question
In order to leave comments, you need to log in
request is deprecated, use node-fetch , everything is simpler there
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question