
xdmp.getRequestHeader( name as String, [default as String?] ) as Sequence
Returns the value of a named request header.
In an isolated evaluation context (see xdmp.isIsolated), this function is not available and throws XDMP-ISOLATED.
| Parameters | |
|---|---|
| name | Request header name. |
| default | A default value to return if there is no request header. |
Accessing the Authorization or Proxy-Authorization headers
requires the execute privilege
http://marklogic.com/xdmp/privileges/xdmp-get-request-header-sensitive.
All other headers require no privilege.
xdmp.getRequestHeader("A");
=> "foo"