Modules
Objects/Functions
SuiteScript 2.0
{https}.request({method: {enum*},url: {string*},body: {string | Object},credentials: {string[]},headers: {Object}})
N/https Module
https.request()
Method Description:
Sends an HTTPS request.
If negotiating a connection to the destination server exceeds 5 seconds, a connection timeout occurs. If transferring a payload to the server exceeds 45 seconds, a request timeout occurs.
Returns:
https.ClientResponse or https.ServerResponse
Supported Script Types:
Server scripts
For more information, see SuiteScript 2.0 Script Types.
Governance:
10 units
Module:
N/https Module
Since:
2015.2
Search NetSuite -
https://system.netsuite.com/app/help/helpcenter.nl?search=https.request(options)
Example:
// Code Example 1
// Add additional code
//...
var headerObj = {
name: 'Accept-Language',
value: 'en-us'
};
var response = https.request({
method: https.Method.GET,
url: 'https://www.testwebsite.com',
body: 'My REQUEST Data',
headers: headerObj
});
//...
// Add additional code
//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4567630582.html