Loading TOC...

xdmp.httpOptions

xdmp.httpOptions(
   $uri as String,
   [$options as Object?]
) as ValueIterator

Summary

Sends the http OPTIONS method to the specified URI. Returns the http response for the specified URI.

Parameters
$uri The URI of the document whose options response is being requested.
$options The options object for this request. The default value is null. The options are the same as the other xdmp.http* functions, and the options are documented with the xdmp.httpGet $options parameter.

Required Privileges

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

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.httpOptions("http://localhost:8000/",
     {
       "authentication" : {
         "method" : "digest",
         "username" : "myname",
         "password" : "mypassword"
       }
     })
=> the response from the HTTP server, for example:

<response xmlns="xdmp:http">
  <code>302</code>
  <message>Found</message>
  <headers>
    <location>/use-cases/</location>
    <server>MarkLogic</server>
    <content-length>0</content-length>
    <connection>close</connection>
  </headers>
</response>



Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy