0
votes

I am attempting to work with Bing's Spell Check API and keep running into this error:

{"_type": "ErrorResponse", "errors": [{"code": "RequestParameterMissing", "message": "Required parameter is missing.", "parameter": "text"}]}% 

I am using curl to send the request and am formatting it like so:

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"

I am really not sure what the issue is here so any help would be appreciated... Thanks in advance.

Also, this is the example I am looking at on Microsoft's site: https://dev.cognitive.microsoft.com/docs/services/56e73033cf5ff80c2008c679/operations/56e73036cf5ff81048ee6727

1

1 Answers

2
votes

Please try:

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"

Note that mode must be lowercase, and form fields must be specified as such.