How can I get / pass the "body" from this function to a higher level (to another top level function)?
function f() {
var request = require('request');
request({
method: 'GET',
url: 'https://private-anon-147dec1d33-topupsapi.apiary-mock.com/operators/auto-detect/phone/+50936377111/country-code/HT?&includeBundles=true',
headers: {
'Accept': 'application/com.reloadly.topups-v1+json',
'Authorization': 'Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik0wWXpRa'
}
}, function (error, response, body) {
console.log('Status:', response.statusCode);
console.log('Headers:', JSON.stringify(response.headers));
console.log('Response:', body);
});
}