Loading TOC...

MarkLogic 12 Product Documentation
xdmp:get-response-code

xdmp:get-response-code() as item()*

Summary

Returns two nodes, the first containing the HTTP response code and the second containing the HTTP response message.

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

Usage Notes

You can use this with an HTTP Server error handler to create custom error pages.

Example

xdmp:get-response-code()
=> 200
   OK

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