North-Seattle-College / ad440-winter2022-tuesday-repo

North Seattle College AD 440 Winter 2020 Cloud Practicum class repoitory
Apache License 2.0
0 stars 4 forks source link

lambda for split sentence #141

Closed TurkiBK closed 2 years ago

TurkiBK commented 2 years ago

close #118

To test it

Prerequisites

Using postmen or smiler

  1. Copy the endpoint and post it on the postmen url
  2. Change method from get to post
  3. select body, raw ,and change text to JSON
  4. sending json as {"feedback":"write something here. And keep writing, and keep. One more word. "}
  5. click send
  6. and response will be "sentence":"write something here." , " And keep writing, and keep." , "One more word. , "}
  7. getting response with 200 when it is succeed.
  8. getting response 400 for empty string

Using terminal

  1. % curl -d '{"feedback":"Good job! thanks."}' -H "Content-Type: application/json" -X POST https://vj8nnyb1vg.execute-api.us-west-2.amazonaws.com/default/breakFeedbackInSentence
  2. getting response with 201 when it is succeed
  3. getting response 400 for empty string

Galary

Screen Shot 2022-03-22 at 12 32 49 PM

Screen Shot 2022-03-21 at 11 04 17 AM

dansjack commented 2 years ago

Is the goal of this function to split feedback into sentences? From the output it appears to just be replacing . with ,.

image

Also if there's no white space in the feedback string, it causes an internal server error

image