Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.getRequestUrl

xdmp.getRequestUrl() as String

Summary

Returns the portion of the URL following the host_name:port_number. The output does not include any fragment identifier supplied with the URL (that is, it does not include the # sign or anything following the # sign). Note that when a URL rewriter is used, this function returns the rewritten URL. To get the URL before rewriting occurs, use xdmp.getOriginalUrl.

In an isolated evaluation context (see xdmp.isIsolated), this function is not available and throws XDMP-ISOLATED.

Example

xdmp.getRequestUrl();
=> "/example.xqy?name=foo&year=2006"

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