Successfully added
Snipps
by Patrik
HTTP PUT
The HTTP PUT request method creates a new resource or replaces a representation of the target resource with the request payload.
The difference between PUT and POST is that PUT is idempotent: calling it once or several times successively has the same effect (that is, no side effect), whereas successive identical POST requests may have additional effects, akin to placing an order several times.
...see more
It is possible to use PUT without a body like
PUT /example HTTP/1.0
Content-Type: text/plain
Content-Length: 0
A sample would be the github starring API, which uses PUT with an empty body to turn on a star and DELETE to turn off a star.
Referenced in:
Leave a Comment
All fields are required. Your email address will not be published.
Comments