【发布时间】:2021-12-14 14:23:47
【问题描述】:
我使用 Docker 创建了 moodle 和 mariadb 容器。
Moodle:3.11.4
Mariadb:10.3
我正在尝试执行以下 web 服务:
客户:
wwwroot: 'http://localhost:8012',
服务:'moodle_mobile_app',
令牌:'8faf4879d2c654f11e404095032ae382',
严格SSL:真
致电: curl "http://localhost:8012/webservice/rest/server.php?wstoken=8faf4879d2c654f11e404095032ae382&moodlewsrestformat=json&wsfunction=core_user_get_users_by_field&moodlewsrestformat=json&id=2"
但出现以下错误: {"exception":"invalid_parameter_exception","errorcode":"invalidparameter", "message":"检测到无效的参数值(单个结构中缺少必需的键:字段)", "debuginfo":"单个结构中缺少必需的键:字段" }
我用moodle client for node也试过了
... client.call({ wsfunction: "core_user_get_users_by_field", method: "POST", args: { id: 2 } })...
但也收到同样的错误。
我检查了 API 文档,id 是这个的有效参数
网络服务。
你能帮忙吗?
【问题讨论】:
标签: node.js docker-compose moodle-api moodle-mobile