Loading TOC...

MarkLogic 12 EA 2 Product Documentation
xdmp:http-delete

xdmp:http-delete(
   $uri as xs:string,
   [$options as (element()|map:map)?]
) as item()+

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 Options with which to customize this operation. You can specify options as either an XML element in the "xdmp:http" namespace, or as a map:map. For details on the supported options, see xdmp:http-get.

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:http-delete 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:document-delete function.

Example

xdmp:http-delete("http://www.my.com/document.xhtml",
     <options xmlns="xdmp:http">
       <authentication method="basic">
         <username>myname</username>
         <password>mypassword</password>
       </authentication>
     </options>)
=> an optional response from the server


Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.