Ambassador icon indicating copy to clipboard operation
Ambassador copied to clipboard

Adjust Reader example code to wait for input

Open tlk opened this issue 5 years ago • 1 comments

README.md has examples on how to use DataReader, JSONReader and URLParametersReader and the instructions says that the example code will wait for input to be read.

However, as explained by @fangpenlin in https://github.com/envoy/Ambassador/issues/18#issuecomment-314665741 the current example code

(..) is meant for returning simple data without any async operation, that's why it won't wait for reading POST data body or any other HTTP body data

I suggest updating the example code to wait for input and to handle the case of no input at all (see envoy/Embassy#64).

tlk avatar Dec 14 '19 14:12 tlk

Refs #37

tlk avatar Dec 14 '19 14:12 tlk