I need simple web server for debugging my application (Arduino web client, curl, etc.).
What is my idea:
I run command like
curl -X POST -H "Content-Type: application/json" \
-H "Accept: application/json" -d '{"address":"192.168.200.3", \
"title":"Abc" }' http://SERVER/xyz
to test webserver running at http://SERVER:80
. This webserver write data + all http headers to standard terminal output.
It will be great for testing Arduino with Ethernet shield.
Is there any exiting product (for Linux)? I can write it in Java, but I do not want to reinvent the wheel...
I always use nc (netcat) for this, in a style like:
nc -l -p 8080
It isn't really a "HTTP server" but only a dumb TCP server, but if you're mostly interested in seeing the client request and not necessarily serving back a proper HTTP response then it is good enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With