-<xqdoc:xqdoc>
-<xqdoc:module type="library">
<xqdoc:uri>http://exist-db.org/xquery/httpclient</xqdoc:uri>
-<xqdoc:comment>
<xqdoc:description>A module for performing HTTP requests as a client</xqdoc:description>
</xqdoc:comment>
</xqdoc:module>
-<xqdoc:functions>
-<xqdoc:function>
<xqdoc:name>get</xqdoc:name>
<xqdoc:signature>httpclient:get($a as xs:anyURI, $b as xs:boolean, $c as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP GET request. $a is the URL, $b determines if cookies persist for the query lifetime. $c defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers><httpclient:body type="xml|xhtml|text|binary" mimetype="returned content mimetype">body content</httpclient:body></httpclient:response> where XML body content will be returned as a Node, HTML body content will be tidied into an XML compatible form, a body with mime-type of "text/..." will be returned as a URLEncoded string, and any other body content will be returned as xs:base64Binary encoded data.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>put</xqdoc:name>
<xqdoc:signature>httpclient:put($a as xs:anyURI, $b as node(), $c as xs:boolean, $d as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP PUT request. $a is the URL, $b is the XML PUT payload/content, $c determines if cookies persist for the query lifetime. $d defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers><httpclient:body type="xml|xhtml|text|binary" mimetype="returned content mimetype">body content</httpclient:body></httpclient:response> where XML body content will be returned as a Node, HTML body content will be tidied into an XML compatible form, a body with mime-type of "text/..." will be returned as a URLEncoded string, and any other body content will be returned as xs:base64Binary encoded data.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>delete</xqdoc:name>
<xqdoc:signature>httpclient:delete($a as xs:anyURI, $b as xs:boolean, $c as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP DELETE request. $a is the URL, $b determines if cookies persist for the query lifetime. $c defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers><httpclient:body type="xml|xhtml|text|binary" mimetype="returned content mimetype">body content</httpclient:body></httpclient:response> where XML body content will be returned as a Node, HTML body content will be tidied into an XML compatible form, a body with mime-type of "text/..." will be returned as a URLEncoded string, and any other body content will be returned as xs:base64Binary encoded data.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>post</xqdoc:name>
<xqdoc:signature>httpclient:post($a as xs:anyURI, $b as node(), $c as xs:boolean, $d as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP POST request. $a is the URL, $b is the XML POST payload/content, $c determines if cookies persist for the query lifetime. $d defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers><httpclient:body type="xml|xhtml|text|binary" mimetype="returned content mimetype">body content</httpclient:body></httpclient:response> where XML body content will be returned as a Node, HTML body content will be tidied into an XML compatible form, a body with mime-type of "text/..." will be returned as a URLEncoded string, and any other body content will be returned as xs:base64Binary encoded data.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>head</xqdoc:name>
<xqdoc:signature>httpclient:head($a as xs:anyURI, $b as xs:boolean, $c as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP HEAD request. $a is the URL, $b determines if cookies persist for the query lifetime. $c defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers></httpclient:response></xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>options</xqdoc:name>
<xqdoc:signature>httpclient:options($a as xs:anyURI, $b as xs:boolean, $c as element()?) item()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Performs a HTTP OPTIONS request. $a is the URL, $b determines if cookies persist for the query lifetime. $c defines any HTTP Request Headers to set in the form <headers><header name="" value=""/></headers>. This method returns the HTTP response encoded as an XML fragment, that looks as follows: <httpclient:response xmlns:httpclient="http://exist-db.org/xquery/httpclient" statusCode="200"><httpclient:headers><httpclient:header name="name" value="value"/>...</httpclient:headers></httpclient:response></xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
-<xqdoc:function>
<xqdoc:name>clear-persistent-cookies</xqdoc:name>
<xqdoc:signature>httpclient:clear-persistent-cookies() empty()</xqdoc:signature>
-<xqdoc:comment>
<xqdoc:description>Clears any persistent cookies.</xqdoc:description>
</xqdoc:comment>
</xqdoc:function>
</xqdoc:functions>
</xqdoc:xqdoc>