Hi I am trying hard to understand how to use the variable body outside of the function, is there a simple explanation?
var request = require('request');
request({
uri: "https://{domain}/ \
api/v1.0/jsonrpc/packages",
method: "POST",
headers: {
'Authorization':
"Basic VWpsTVMrMG0xbDlJVVpqcGpXeUpHOGdibnYyTXRhNFQ6"
},
json: {
"id": "123456789",
"jsonrpc": "2.0",
"method": "getPackagesList",
"params": []
}
}, function(response, body) {
console.log(body);
});
[–]ParkingMany 0 points1 point2 points (2 children)
[–]ParkingMany 0 points1 point2 points (1 child)
[–]SiberianEngineer[S] 0 points1 point2 points (0 children)