Loading TOC...


   $uri as String,
   [$options as Object?],
   [$data as Node?]
) as ValueIterator


Sends an HTTP PUT request to an HTTP server. The HTTP server should return a response, which will differ depending on the action the HTTP server takes for the PUT.

$uri The URI to which the data is to be put.
$options The options object for this request. The default value is null.

The options include the following option, in addition to the options documented with the xdmp.httpGet $options parameter:


This option can contain any string. Anything in the data option is sent as a string in the PUT body. If binary is to be sent, it can be specified as the optional third argument instead.

The other options are the same as the other xdmp.http* functions, and the options are documented with the xdmp.httpGet $options parameter.

$data The data for this request. This is an alternative to the data option for the second parameter that allows binary content to be specified for the body of the PUT.

Required Privileges


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).

If you expect the request body from this http function to be processed by another application (via a web service, for example), you should specify a content-type header. If no content-type header is specified, the content type defaults to text/plain.


       "authentication" : {
         "method" : "basic",
         "username" : "myname",
         "password" : "mypassword"
=> the response from the HTTP server as well as the specified document


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