
xdmp:get-request-header( $name as xs:string, [$default as xs:string?] ) as xs:string*
Returns the value of a named request header.
In an isolated evaluation context (see xdmp:is-isolated), 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:get-request-header("A")
=> "foo"