ServerResponse.getHeader(options)
Method Description |
Returns the value or values of a response header. If multiple values are assigned to the header name, the values are returned as an Array. For more information, see HTTPS Header Information. |
Returns |
string | string[] |
Supported Script Types |
Server scripts For more information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options
parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The name of the header. |
2015.2 |
Errors
Error Code |
Message |
Thrown If |
---|---|---|
|
Missing a required argument: {param name} |
The |
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
...
serverResponse.getHeader({
name: 'Accept-Language'
});
...
// Add additional code