isahb / sls-spellchecker

A Serverless Spell Checker
MIT License
6 stars 6 forks source link

How do I deploy this? #4

Closed shamoons closed 4 years ago

shamoons commented 4 years ago

I get an error:

{
  "message": "Missing Authentication Token"
}

https://ms280cbk75.execute-api.us-east-2.amazonaws.com/dev/checkSpelling

isahb commented 4 years ago

I checked your lambda and it's working OK. Make sure your request method and body is in proper format.

curl --location --request POST 'https://ms280cbk75.execute-api.us-east-2.amazonaws.com/dev/checkSpelling' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "The text to chek for spelling"
}'

Response:

{
    "error": null,
    "spellCheckSuggestions": [
        {
            "startPos": 12,
            "endPos": 16,
            "message": "Possible spelling mistake found",
            "suggestedReplacements": [
                "check",
                "Chen",
                "cheek",
                "chef",
                "Che",
                "chew",
                "CHK",
                "chem"
            ]
        }
    ]
}