New Methods in N/https Module

You can now use the N/https module to communicate between SuiteScript scripts and Suitelet using the
following new methods:

https.requestSuitelet(options)

Sends an HTTPS request to a Suitelet and returns the response. Use this method to perform an outbound HTTPS request in an anonymous client-side context. You can do this by performing the HTTPS request inside a Suitelet that is available without login, then calling the Suitelet inside your client script using the https.requestSuitelet(options) method. Currently, this method is supported only with the options.external parameter set to true.

https.requestSuitelet({
    scriptId: "custscript_myScript",
    deploymentId: "custdeploy_myDeployment",
    external: true,
    urlParams: {
        address: address
    }
});

Leave a comment

Your email address will not be published. Required fields are marked *