MarkLogic 9 Product Documentation
xdmp.httpHead

xdmp.httpHead(
   uri as String,
   [options as Object?]
) as Sequence

Summary

Sends the http HEAD method to the specified URI. Returns the http response header for the specified URI.

Parameters
uri The URI of the document whose response header is being requested.
options Options with which to customize this operation. For details on the supported options, see xdmp.httpGet.

Required Privileges

http://marklogic.com/xdmp/privileges/xdmp-http-head

Usage Notes

The http functions only operate on URIs that use the http or https schemes; specifying a URI that does not begin with http:// or https:// throws an exception.

If an http function times out, it throws a socket received exception (SVC-SOCRECV).

Example

xdmp.httpHead("http://www.my.com/document.xhtml",
     {
       "authentication" : {
         "method" : "basic",
         "username" : "myname",
         "password" : "mypassword"
       }
     })
=> the response header from the server


Powered by MarkLogic Server | Terms of Use | Privacy Policy