Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp:get-request-header

xdmp:get-request-header(
   $name as xs:string,
   [$default as xs:string?]
) as xs:string*

Summary

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.

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:get-request-header("A")
=> "foo"

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