Property Description

The response header or headers.

For more information, see HTTPS Header Information.


Object.<String, String[]> // Client SuiteScript

Object.<String, String> // Server SuiteScript

Supported Script Types

Server scripts

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


N/https Module




Error Code

Thrown If


You attempted to edit this property. This property is read-only.


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 response = https.get({
    url: ''
    title: 'Client Response Header',
    details: response.headers
// Add additional code 


HTTP allows multiple response headers with the same name. Therefore, in the browser (client SuiteScript), a header value is a list of strings. On the server, however, for legacy reasons, a header value is only a string. If a response contains multiple headers with the same name, only the first one can be retrieved.

          // Client SuiteScript
>>> response.headers["cache-control"]
[ "no-cache", "no-store" ]

// Server SuiteScript
>>> response.headers["cache-control"]


HTTP headers are defined as case insensitive. It is best to retrieve specific headers in lower-case. For example, response.headers["content-type"].

For compatibility reasons, each header is repeated in two to three cases. For example:

          "content-type"  // lower-case
"Content-Type"  // Title-Case
"CONTENT-type"  // original case (if it differs from the previous two) 


Related Topics

General Notices