Below is a PERL snippet for invoking NetSuite RESTlets:
# define the HTTP header
my $objHeader = HTTP::Headers->new;
my $deploymentURL =
"https://rest.na1.netsuite.com/app/site/hosting/restlet.nl?script=841&deploy=1";
$objHeader->push_header('Authorization' => "NLAuth
nlauth_account=$account, nlauth_email=$email,
nlauth_signature=$password, nlauth_role=$role");
$objHeader->push_header('Content-Type' => 'application/json');
# make the call
my $objRequest = HTTP::Request->new("POST",$deploymentURL,$objHeader,$request);
Note:
$account - NetSuite account number
$email - user's email
$password - user's password
$role - user's role
No comments:
Post a Comment