var request = require('request');
var qs = require('qs')
request(
{
'method': 'POST',
'url': 'https://postman-echo.com/post',
'headers': {
'Accept': 'application/json',
'content-type': 'application/x-www-form-urlencoded',
},
'body': qs.stringify({
'scope': 'my_scope',
})
},
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body) // Show the HTML for the Google homepage.
} else {
console.warn(error);
}
}
);
// suppress the direct output of the call. you can expand the result below
"loading..."