Modules

filter

 

Objects/Functions

module (N/http)

SuiteScript 2.0

ServerRequest.headers

// Please search https://system.netsuite.com/app/help/helpcenter.nl?search=ServerRequest.headers for more information.

N/http Module
ServerRequest.headers
Property Description: The header information included in the http call. This object represents a series of name:value pairs. Each pair represents a request header name and its value. Typically, this object encapsulates two iterations of each header name: one in lower case and another in title case. This behavior is designed so that you can use either lower case or title case when you reference a header. However, the existence of title-case iterations of header names is not guaranteed. For best results, refer to header names using all lower-case letters (and hyphens, when applicable). The request headers and their values are subject to change. If you use these headers in your scripts, you are responsible for testing them to make sure that they contain the information you need. For example, when making an HTTP call to a Suitelet, some headers might be filtered out. Filtering can occur if the headers affect how NetSuite processes the request internally. These filtered headers are not available to the Suitelet, so you should test to see whether a header was filtered out. If so, use a different header instead. For more information, see HTTP Header Information.
Type: Object (read-only)
Supported Script Types: Server scripts For more information, see SuiteScript 2.0 Script Types.
Module: N/http Module
Parent Object: http.ServerRequest
Sibling Object Members: ServerRequest Object Members
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=ServerRequest.headers

Example:

// Code Example 1
// Add additional code
//...
log.debug({
title: 'Server Request Headers',
details: request.headers
});
//...
// Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4314803549.html