xdmp.httpDelete( uri as String, [options as Object?] ) as Sequence
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 | Options with which to customize this operation. For details on the supported options, see xdmp.httpGet. |
http://marklogic.com/xdmp/privileges/xdmp-http-delete
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.
xdmp.httpDelete("http://www.my.com/document.xhtml", { "authentication" : { "method" : "basic", "username" : "myname", "password" : "mypassword" } }) => an optional response from the server