我在Apigee中有一个API代理,它使用API密钥进行身份验证。我通过使用卷曲我的HTTP请求头中的关键,用这个命令:传递带有HTTP标头的API密钥cURL
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".
当我修改我的政策,以寻找在查询参数的关键而不是头,它工作正常。我在这里错过了什么吗?