Skip to content
Commit 8a8f2814 authored by Matt Rodgers's avatar Matt Rodgers Committed by Anas Nashif
Browse files

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: default avatarMatt Rodgers <mrodgers@witekio.com>
parent c756fef2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment