【发布时间】:2012-03-06 18:03:43
【问题描述】:
我正在尝试连接到安装在 http://localhost 的 CollectiveAccess 应用程序(它基于 Zend 框架)的 Web 服务。 根据documentation`,应该像这样进行身份验证:
http://localhost/ca5/service.php/iteminfo/ItemInfo/rest?method=auth&username=admin&password=123456
然后,可以像这样访问 API:
http://localhost/service.php/iteminfo/ItemInfo/rest?method=getLabels&type=ca_objects&item_id=4&mode=all
如果我将 URL 粘贴到网络浏览器中,这对我有用,但我无法使用 HTTParty 的 basic_auth 或 digest_auth 方法使其工作。
【问题讨论】:
-
这里有一些 cookie。我会尝试机械化。
标签: ruby zend-framework rest httpclient httparty