HTTP PUT Method

Information about the HTTP PUT method.

HTTP PUT

Create a new resource, or replace the existing one, with the contents of the request body.

This is different from a POST in that PUT is idempotent and there should be no extra side-effects other than the changing of the resource.

Request Body

Data in a request body should be sent.

Response Body

A response body will be returned with a successful response.

Cache

The response cannot be cached.

Idempotent

The request should not cause any side-effects on the server and it should be possible to issue the same request several times with the server being left in the same state.

This is not enforced by the server and a common mistake is for an idempotent request to change the server state.

Example

PUT /
PUT /a-url/?search=cat

Reference

https://tools.ietf.org/html/rfc7231#section-4.3.4