【发布时间】:2019-07-24 16:38:31
【问题描述】:
如果我直接粘贴到命令窗口,此命令可以正常工作:
curl -X POST -H "Content-type: application/json" --data "{\"text\":\"test\"}" --url "https://chat.googleapis.com/v1/spaces/[removed]/messages?key=[removed]&token=[removed]"
然而,当我在批处理文件中执行此操作时,我收到以下信息:
{
"error": {
"code": 400,
"message": "Request contains an invalid argument.",
"status": "INVALID_ARGUMENT"
}
}
我已经尝试了在 json 数据语句中转义引号的所有排列,但没有成功。
【问题讨论】:
-
也许尝试添加-g switch?
标签: json api batch-file chat hangouts-chat