I have been trying simple REST call with XQIB. My attempt is only more simplified example (http://www.xqib.org/js/RESTCallCourses_source.html), but I can't get to run neither of them. I get the same error in both cases:
MXQuery output the following error during compilation: Line 8, Column 12: err:XPST0017 Function named http-client:send-request with arity 1 not available
It must be something obvious, but I can't figure it out. Here is my code:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Sample</title>
<meta charset="UTF-8"/>
<script type="text/javascript" src="mxqueryjs/mxqueryjs.nocache.js"></script>
<script type="application/xquery">
declare namespace http-client = "http://expath.org/ns/http-client";
for $x in http-client:send-request
(
<http-client:request href="http://www.fi.muni.cz/~xprazak2/xqib/samplefires.xml" method="get"/>
)//*:street
return
insert node
<p>{$x/*:street/data(.)}</p>
as last into b:dom()//body
</script>
</head>
<body>
<h1>Will it work?</h1>
</body>
</html>
I even tried functions with different arities (http://www.zorba-xquery.com/html/modules/expath/http-client), same error. Has anyone encountered this before?