Loading TOC...

xdmp.httpDelete

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

Summary

Sends an http DELETE request to the http server specified in the URI to delete the specified resource. The server should respond if the request is to be completed, but a response is not guaranteed. Also, even if the server does respond, it does not guarantee that the request has been or will be completed.

Parameters
$uri The URI of the document to delete.
$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-delete

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

Note the xdmp.httpDelete function simply sends a DELETE request to the specified web server; what happens with the DELETE request depends on the web server. The request does not delete a document from a MarkLogic Server database. To delete a document from a database, use the xdmp.documentDelete function.

Example

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


Comments

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