Hello, does anyone know if `https.requestRestlet()...
# suitescript
l
Hello, does anyone know if
https.requestRestlet()
works as expected? I am trying to pass some arguments via
options.urlparams
parameter from Suitelet to RESTlet (notice that help describes the parameter as
options.urlParams
(camelcase) and uses
urlparams
(lowercase) in code example - camelcase returns error
SSS_INVALID_TYPE_ARG
error). When I try to log passed parameters in RESTlet, it returns empty object. When I manually add parameters to RESTlet url in browser, script logs params correctly. I tried stringifying
urlparams
parameter in RESTlet as well as adding "Content-Type: application/json" header, to no avail. Below is the most recent piece of code: Suitelet:
Copy code
_https.requestRestlet({
    deploymentId: DEPLOYMENT_ID,
    headers: { "Content-Type": "application/json" },
    method: "GET",
    scriptId: SCRIPT_ID,
    urlParams: { param1: "value", param2: "value2" },
});
RESTlet:
Copy code
const _get = (context) => {
   log.debug({
     title: "get() - context",
     details: { context },
   });

   return [];
});