https.delete(options)
Method Description |
Sends an HTTPS DELETE request.
Important:
If it takes longer than 5 seconds to connect to the destination server, the connection times out. If sending the request payload takes more than 45 seconds, the request times out. This method doesn’t work in unauthenticated client-side contexts. For details, see the SuiteAnswers article Outbound HTTPs in an unauthenticated client-side context.
Note:
The options.body parameter isn’t supported for this method. You don’t need a payload for DELETE requests. |
Returns |
|
Supported Script Types |
Client and server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
10 units |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The HTTPS URL being requested |
2015.2 |
|
Object |
optional |
The HTTPS headers. For more information, see HTTPS Header Information. |
2015.2 |
Errors
Error Code |
Message |
Thrown If |
---|---|---|
|
An untrusted, unsupported, or invalid certificate was found for this host. |
The client and server could not negotiate the desired level of security. The connection is no longer usable. You may also receive this error if the domain name in the
|
|
The URL must be a fully qualified HTTP/HTTPS URL. |
An invalid URL is specified in the |
|
Missing a required argument: {param name} |
The |
|
This script executes a recursive function that has exceeded the limit for the number of times a script can call itself using an HTTP request. Please examine the script for a potential infinite recursion problem. |
A script is calling back into itself recursively using an HTTP/HTTPS request. |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/https Module Script Samples.
// Add additional code
...
var headerObj = {
name: 'Accept-Language',
value: 'en-us'
};
var response = https.delete({
url: 'https://www.mytestwebsite.com',
headers: headerObj
});
...
// Add additional code