RunKit + npm: request

node v11.15.0
endpointsharetweet
var request = require('request'); request( { 'method': 'POST', 'url': 'https://postman-echo.com/post', 'headers': { 'Accept': 'application/json', 'content-type': 'application/x-www-form-urlencoded', }, 'body': { '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..."
Created from: https://npm.runkit.com/request
Loading…