clientCertificate.request(options)

Method Description

Method used to send a SSL secured request to a remote service and return the response.

Important:

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

An https.ClientResponse Object

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

10 units

Module

N/https/clientCertificate Module

Since

2019.2

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.url

string

required

The URL address of the remote server.

2019.2

options.body

string

required for PUT and POST methods | optional for HEAD, GET, DELETE

The REQUEST data to be sent to the remote server.

2019.2

options.certId

string

required

The ID of the client certificate.

2019.2

options.headers

object

required

The HTTP headers associated with the request.

2019.2

options.method

string

required

The HTTP method to be used. Use the https.Method enum to set this value.

2019.2

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/https/clientCertificate Module Script Sample.

            // Add additional code
...
var response = cert.request({
    url: "https://anyurl.any",
    certId: "custcertificate1",  // replace with the ID of a predefined, existing certificate
    headers: {
        "Content-Type": "application/soap+xml"
    },
    method: http.Method.GET
});
...
// Add additional code 

          

Related Topics

General Notices