1 | initial version |
It is always a good idea to look at the RFC's, even if they may seem a bit overwhelming. In this case look at RFC 7231. As far as sending data from the client to the server these requests are similar. How the server is to handle the data is significantly different though.
For a PUT request the URI defines the resource to be manipulated. This is a restrictive definition, which results in the characteristics you already described.
For a POST request it is up to the server to determine what to do with the data in the request. Therefor it has a lot of freedom what to do with the POST request. Most notably the URI defines the API on the sever, not so much a resource to be manipulated.
After a PUT request you should be able to use a GET request to access the same resource again, this does not hold true after a POST request.
From a CS point of view you'll see that the HTTP server has an implementation to handle PUT requests itself, while POST requests are usually handed off to an external process (e.g, via FastCGI to PHP interpreter). This provides the freedom to handle the POST request as desired.