Basic handling of GET POST PUT using BaseHTTPRequestHandler
suggest changeThe PUT response body repeats the POST text (received post request), so this transcript does not show a separate PUT handler.
Example output using curl:
$ curl http://localhost/
received get request
$ curl -X POST http://localhost/
received post request:<br>
$ curl -X PUT http://localhost/
received post request:<br>
$ echo 'hello world' | curl --data-binary @- http://localhost/
received post request:<br>hello world
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents