<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/xdmp.httpDelete.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>xdmp.httpDelete</api:function-name><api:suggest>xdmp.httpdelete</api:suggest><api:suggest>xdmp</api:suggest><api:suggest>httpdelete</api:suggest><api:function-link mode="xquery" fullname="xdmp:http-delete">/apidoc/8.0/xdmp:http-delete.xml</api:function-link><api:function mode="javascript" name="httpDelete" type="builtin" lib="xdmp" category="Extension" subcategory="HTTP" hidden="false" bucket="MarkLogic Built-In Functions" prefix="xdmp" namespace="http://marklogic.com/xdmp" fullname="xdmp.httpDelete"><api: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.
</api:summary><api:params><api:param name="uri" type="xs:string" optional="false"><api:param-description>
    The URI of the document to delete.
  </api:param-description><api:param-name>uri</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="options" type="(element()|map:map)?" optional="true"><api:param-description>
    
    <span class="javascript" xmlns="http://www.w3.org/1999/xhtml">The options object for this request. The default value is null.
    The options are the same as the other <code>xdmp.http*</code> functions, and
    the options are documented with the
    <a href="./xdmp.httpGet"><code>xdmp.httpGet</code></a> $options parameter.</span>
  </api:param-description><api:param-name>options</api:param-name><api:param-type>Object?</api:param-type></api:param></api:params><api:return>ValueIterator</api:return><api:usage>
   <p xmlns="http://www.w3.org/1999/xhtml">The http functions only operate on URIs that use the http or https
   schemes; specifying a URI that does not begin with <code>http://</code>
   or <code>https://</code> throws an exception.</p>
   <p xmlns="http://www.w3.org/1999/xhtml">If an http function times out, it throws a socket received
   exception (SVC-SOCRECV).</p>
   
   <p class="javascript" xmlns="http://www.w3.org/1999/xhtml">Note the <code>xdmp.httpDelete</code> 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
   <a href="./xdmp.documentDelete">
   <code>xdmp.documentDelete</code></a>
   function.</p>
</api:usage><api:privilege>
   <code xmlns="http://www.w3.org/1999/xhtml">http://marklogic.com/xdmp/privileges/xdmp-http-delete</code>
</api:privilege><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
xdmp.httpDelete("http://www.my.com/document.xhtml",
     {
       "authentication" : {
         "method" : "basic",
         "username" : "myname",
         "password" : "mypassword"
       }
     })
=&gt; an optional response from the server


</pre></api:example></api:function></api:function-page>