I'm developing an Arduino server that should respond with a message when it receives a POST Request.
If I test my project with a HTTP Client (like insomnia or postman), I get an error:
Error: Failure when receiving data from the peer
I still get a response that I can read but with a final error.
That's my client request:
> POST /SOMETHING/ HTTP/1.1 > Host: [ARDUINO IP] > User-Agent: insomnia/6.2.0 > Accept: */* > Content-Length: 0
And this is my Arduino response considered as not valid:
< HTTP/1.1 200 OK < Connection: close < [MY MESSAGE] * Recv failure: Connection reset by peer * stopped the pause stream! * Closing connection 2
As you can notice, I just added 2 strings
HTTP/1.1 200 OK Connection: close
before the real message.
Am I missing something to create a valid response?