我正在尝试连接到安装在http://localhost的 CollectiveAccess 应用程序(它基于 Zend 框架)的 Web 服务。根据文档`一个人应该像这样进行身份验证:
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 粘贴到 Web 浏览器中,这对我有用,但我无法使用 HTTParty 的 basic_auth 或 digest_auth 方法使其工作。