gpt4 book ai didi

javascript - 带有 XQIB 的 REST 调用报告功能发送请求不可用

转载 作者:行者123 更新时间:2023-11-30 06:33:13 25 4
gpt4 key购买 nike

我一直在尝试使用 XQIB 进行简单的 REST 调用。我的尝试只是更简化的示例(http://www.xqib.org/js/RESTCallCourses_source.html),但我无法同时运行它们。在这两种情况下我都得到了同样的错误:

MXQuery output the following error during compilation: Line 8, Column 12: err:XPST0017 Function named http-client:send-request with arity 1 not available

这一定是显而易见的事情,但我想不通。这是我的代码:

<!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>

我什至尝试了不同参数(http://www.zorba-xquery.com/html/modules/expath/http-client)的函数,同样的错误。有人遇到过这个吗?

最佳答案

Seems like a bug to me. It is definitely in the spec and I also tried with another XQuery processor, where this query works fine. I also tried using xqib and got the same error. Looks to me like the version used in there demo is more up-to-date than what is in the svn or you have to build it yourself with some special parameters

关于javascript - 带有 XQIB 的 REST 调用报告功能发送请求不可用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16213674/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com