Curl 必应拼写检查API返回“;请求参数缺失";错误
我正在尝试使用Bing的拼写检查API,并不断遇到以下错误:Curl 必应拼写检查API返回“;请求参数缺失";错误,curl,microsoft-cognitive,Curl,Microsoft Cognitive,我正在尝试使用Bing的拼写检查API,并不断遇到以下错误: {"_type": "ErrorResponse", "errors": [{"code": "RequestParameterMissing", "message": "Required parameter is missing.", "parameter": "text"}]}% 我使用curl发送请求,并将其格式化如下: curl -v -X POST "https://api.cognitive.microsoft.com
{"_type": "ErrorResponse", "errors": [{"code": "RequestParameterMissing", "message": "Required parameter is missing.", "parameter": "text"}]}%
我使用curl发送请求,并将其格式化如下:
curl -v -X POST "https://api.cognitive.microsoft.com/bing/v5.0/spellcheck/?mode=Spell" -H "Content-Type: application/x-www/form-urlencoded" -H "Ocp-Apim-Subscription-Key: XXXXXXXXXXXXXXXXXXXX" --data-ascii "Text=Hello+Werld"
我真的不知道这是什么问题,所以任何帮助都将不胜感激。。。提前谢谢
另外,这是我在微软网站上看到的例子:
请尝试:
curl -v POST "https://api.cognitive.microsoft.com/bing/v5.0/spellcheck?mode=spell" -H "Ocp-Apim-Subscription-Key: $OXFORD_SPELL_KEY" --form "Text=Hello+Werld"
请注意,模式
必须为小写,并且表单字段必须指定为小写。请尝试:
curl -v POST "https://api.cognitive.microsoft.com/bing/v5.0/spellcheck?mode=spell" -H "Ocp-Apim-Subscription-Key: $OXFORD_SPELL_KEY" --form "Text=Hello+Werld"
请注意,模式
必须为小写,并且表单字段必须指定为小写