Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.getRequestHeader

xdmp.getRequestHeader(
   name as String,
   [default as String?]
) as Sequence

Summary

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.

Required Privileges

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.

Example

xdmp.getRequestHeader("A");
=> "foo"

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.