Changes

Jump to navigation Jump to search
68 bytes removed ,  14:40, 29 July 2019
m
All functions in this module are assigned to the <code><nowiki>http://expath.org/ns/http-client</nowiki></code> namespace, which is statically bound to the {{Code|http}} prefix.<br/>
All errors are assigned to the <code><nowiki>http://expath.org/ns/error</nowiki></code> namespace, which is statically bound to the {{Code|exerrexperr}} prefix.
=Functions=
* In addition to this it can also contain the URI to which the request will be sent and the body of the HTTP method.
* If the URI is not given with the parameter {{Code|$href}}, its value in {{Code|$request}} is used instead.
* The request contents body can also be supplied via the {{Code|$bodies}} parameter.
The structure Notes:* Both basic and digest authentication is supported.* While the contents of the request can be supplied as child of the {{Code|http:requestbody}} element follows , it is faster and safer to pass them on via the third argument.* For further information, please check out the [http://expath.org/spec/http-client EXPath] specification. Both basic and digest authentication is supported.
|-
|'''Errors'''
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="contentContent-typeType" content="text/html; charset=ISO-8859UTF-18"/>
<title>Google</title>
<script>window.google={kEI:"rZB- ... </script> </center>
</body>
</html>
'''Query:'''
<pre class="brush:xquery">
let $http:send-request :=( <http:request href='http://localhost:8984/rest' method='post' username='admin' password='admin' send-authorization='true'> <http:body media-type='application/xml'/> <query xmlns="/http:request>, 'http://basex.orglocalhost:8984/rest"', <query> <text><![CDATA[ <html>{ for $i in 1 to 3 return <div>Section {$i }</div> }</html> ]]> </text> </query> </http:body> </http:request>return http:send-request($request)
</pre>
Bureaucrats, editor, reviewer, Administrators
13,550

edits

Navigation menu