warriorprincess
03/07/2018, 5:35 PMpost("/webhook", {
print("yes")
val post = call.receiveParameters()
print("yes")
orangy
POST
request is not sending any data and not sending an indication of empty request (Content-Length: 0 or zero-chunk), and not closing connection. In this case the handler is suspended and waiting for data.
How do you send the data to webhook
?warriorprincess
03/07/2018, 5:41 PMcurl -H "Content-Type: application/json" -X POST "localhost:1337/webhook" -d '{"object": "page", "entry": [{"messaging": [{"message": "TEST_MESSAGE"}]}]}'
warriorprincess
03/07/2018, 5:42 PMorangy
warriorprincess
03/07/2018, 5:43 PMorangy
receiveParameters
will not work with JSON, it is for form posts (multipart or urlencoded). If you need to receive a data object, you need to setup ContentNegotiation
and recieve a data object.warriorprincess
03/07/2018, 5:46 PMorangy
orangy
warriorprincess
03/07/2018, 5:47 PMwarriorprincess
03/07/2018, 5:48 PMwarriorprincess
03/07/2018, 5:48 PMwarriorprincess
03/07/2018, 5:48 PMorangy
orangy
warriorprincess
03/07/2018, 5:49 PMDeactivated User
03/07/2018, 5:50 PMwarriorprincess
03/07/2018, 5:59 PMDeactivated User
03/07/2018, 7:40 PM