SS2:
var a = {"User-Agent-x": "SuiteScript-Call"};
var response = nlapiRequestURL('
https://www.myapi.com', null, a, null);
var responsebody = JSON.parse(response.getBody());
SS1:
var a = {"User-Agent-x": "SuiteScript-Call"};
var response = http.get({
url: '
https://www.myapi.com',
headers: a
});
var responsebody = JSON.parse(response.getBody());
If you have authorization headers, you'll want to generate and add them .