【发布时间】:2017-04-11 19:28:47
【问题描述】:
我在 Apigee 中有一个使用 API 密钥进行身份验证的 API 代理。我使用 cURL 将密钥与我的 HTTP 请求标头一起传递,使用以下命令:
curl -v -H "apikey: my_key" http://api_org-test.apigee.net/v1/helloapikey
我收到此错误:
Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the
"apikey: my_key" value of type "System.String" to
type "System.Collections.IDictionary".
当我修改我的策略以在查询参数而不是标题中查找键时,它可以正常工作。我在这里遗漏了什么吗?
【问题讨论】:
标签: powershell curl apigee