alfresco aikau 中的 "remote" 对象是什么?

What is the "remote" object in alfresco aikau?

Here 是关于 alfersco CRUD 服务的示例。他们使用:

remote.call("/slingshot/datalists/lists/site/test/dataLists");

进行http请求。我已经检查了 aikau 来源,但它只包含像 remote.connectremote.call 这样的调用,还定义了 aikau 模块不包含来自该对象的显式依赖项。那么什么是 remote 对象?

它基本上是 GET/POST/PUT/DELETE 到外部 URL 的“请求”模块。

它有以下方法:

.post(uri, body)—POSTs content to the given URI

.post(uri, body,contentType)—POSTs content of the specified type to the given URI

.get(uri)—GETs content from the given URI

.put(uri, body)—PUTs content to the given URI

.put(uri, body, contentType)— PUTs content of the specified type to the given URI

.delete(uri)—Invokes a URI as a DELETE request

See the full documentation here

为了扩展 xShirase 提供的答案...远程对象与访问 Alfresco 存储库上可用的 REST API 特别相关,Share 的实例(或任何其他基于 Surf 的应用程序,例如一个独立的 Aikau 客户端)被配置为工作。

Surf 处理所有身份验证,因此一旦提供身份验证(即用户已登录)就不需要再次提供,这也确保只能访问该用户可用的 API。

要理解的关键是,这是一个服务器端应用程序对另一个服务器端应用程序的请求,甚至可能是从一个服务器到另一个服务器端的请求。它不是客户端到服务器的调用。