powershell - 错误 cURL AbuseIPDB 通过 Powershell 命令 - 无法绑定参数“标头”
问题描述
我想询问有关 AbuseIPDB 的 cURL 命令,如https://docs.abuseipdb.com/#check-endpoint中所述
所以我尝试使用以下 Powershell curl 命令运行该命令”
curl -G https://api.abuseipdb.com/api/v2/check \ --data-urlencode "ipAddress=118.25.6.39" \ -d maxAgeInDays=90 \ -H "Key: $MYKEY" \ -H "Accept: application/json"
但是,我收到以下错误描述:
Invoke-WebRequest : Cannot bind parameter 'Headers'. Cannot convert the "Key: " value of type "System.String" to type "System.Collections.IDictionary".
At line:1 char:120
+ ... ys=90 \ -H "Key: $MYKEY ...
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Invoke-WebRequest], ParameterBindingException
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
我想知道我在这里做错了什么?非常感谢您的指点/答案。
解决方案
推荐阅读
- android-jetpack-compose - 如何在 Jetpack Compose 中支持 Smart Recomposition
- arrays - C中的填充字符串
- git - 通过所有提交和分支使用正则表达式搜索字符串 int git repo
- typescript - 尝试在我的 MVC 项目中设置 React TypeScript
- react-native - FlatList - itemVisiblePercentThreshold 无法正常工作
- javascript - 字母数字和特殊字符的打字稿类型
- c# - Json 数据的保存方式取决于本地或根文件路径
- javascript - 由于Javascript中的偏移,剪辑路径在顶部反弹?
- java - 杰克逊反序列化期间json中存在多个别名
- ios - 如何防止用户在 UIImagePickerController 中选择 gif 图像?