What is SuiteScript 2.0 equivalent to nlapiRequestURL ()?

Does anyone know the equivalent of SuiteScript 2.0?

nlapiRequestURL(url, postdata, headers, httpMethod)
+4
source share
1 answer
Modules

httpand are httpsequivalentnlapiRequestURL()

SIMPLE SIMPLE HTTP

var response = http.get({
    url: 'http://www.google.com',
    headers: headers
});

var response = https.post({
    url: 'http://www.google.com',
    body: myPostDataObj,
    headers: headers
});

HTTPS example

 var response = https.get({
     url: url,
     headers: headers
 });
+8
source

Source: https://habr.com/ru/post/1650346/


All Articles