https.ServerResponse

Object Description

The response from an HTTPS server (for example, Suitelet or RESTlet) to an HTTPS request from a server, such as a user event script.

Textual files are re-encoded to UTF-8 by default. If you want to return a file with an alternative character encoding, see Return a File with Alternative Character Encoding.

For a complete list of this object’s methods and properties, see ServerResponse Object Members.

Supported Script Types

Server scripts

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

Module

N/https Module

Since

2015.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 Module Script Samples.

          // Add additional code 
...
serverResponse.addHeader({
    name: 'Accept-Language',
    value: 'en-us',
});
...
// Add additional code 

        

Related Topics

General Notices