I am Trying to call External URL From Suitelet its throwing 406 Error.
var user_name = ‘username’;
var password = ‘password’;
var url=”Url”;
var auth = nlapiEncrypt(user_name+’:’+password,’base64′);
var headers = new Array();
headers[“Content-Type”] = “application/json”;
headers[“Authorization”] = ‘Basic ‘+auth+”;
headers[“Token”] = ‘abcdddd-djfjjff-djd/dkdkd’;
var token_res=nlapiRequestURL(url, null,headers);
var token_response_XML = token_res.getBody();
nlapiLogExecution(‘DEBUG’, ‘token_response_XML’, token_response_XML);
Anyone Suggest Please?
Thanks in Advance