samples: net: http_server: demonstrate dynamic GET and POST
Previously the dynamic resource in the http_server sample simply echo'd
the received data back to the sender. This doesn't demonstrate how the
dynamic handlers would be used in a more typical use case, where the
application may need to wait for the full request before acting on it or
creating a response.
Therefore two new dynamic resources have bee added: a '/led' resource
which can be used to control the board's LED (if present) via a POST
request, and a '/uptime' resource which can be used to query the kernel
uptime via a GET request.
The static resources are updated with some javascript to support
demonstrating the new dynamic resouces via a web browser.
Signed-off-by:
Matt Rodgers <mrodgers@witekio.com>
Loading
Please sign in to comment