I have the following situation.
A driver acting as server via smart-serial.
If a request is made via postman or curl.
A response with 200 and the json body will be visible on the stream viewer.
On postman a status 200 will be available but it will keep waiting until timeout or until the driver is stopped.
Similar with curl.
Tried to close the connection with a close action but i may be missing something.
Could you please give me some advice in how to implement this feature?
Thanks in advance.
If it's unnecessary to implement a full-fledged HTTP Web server, a minimal response for a request should be like this:
HTTP/1.1 200 OK
Content-Type: text/plain; charset=utf-8
The Content-Length should be the body's length, and there must be a new line between the headers and the body. Notice this solution is not intended to be a robust server communication channel but more for occasional confirmation and lightweight responses.