-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question / no question lambda function and the endpoint #171
base: development
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @crystalbroderick , I updated the function to send back boolean isQuestion, and removed the statusCode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some clean up to do - should be quick. Then can approve.
Issue #120
This is and API endpoint to the function that returns the answer if the sent sentence is a question or no.
Endpoint link: https://050l3ftzue.execute-api.us-west-2.amazonaws.com/default/ab-isQuestion
To test:
Using CURL:
Send a request in any command line shell:
curl -X POST 'https://050l3ftzue.execute-api.us-west-2.amazonaws.com/default/ab-isQuestion' -d '{
"sentence": "Is this a question?"}'
Replace text inside the JSON body with your sentence ("sentence": "your sentence here")
You should get a response from the server with the answer "this is a question" or "this is not a question"
Via Postman (web app or a desktop):
Paste the API link https://050l3ftzue.execute-api.us-west-2.amazonaws.com/default/ab-isQuestion to the Postman, choose POST method and modify body by creating a JSON object with key "sentence" and value "(enter your sentence here") like this:
In the response window you should see a response from the server with the answer question/no question