The HTTP PUT method is used to update an existing resource on the server, while the POST method creates or adds a resource on the server. Unlike GET and HEAD requests, the PUT requests may change the server state.

You can send data to the server in the body of the HTTP PUT message. The type and size of data are not limited. But you must specify the data type in the Content-Type header and the data size in the Content-Length header fields. You can also send data to the server using URL parameters. In this case, you are limited to the maximum size of the URL, which is about 2000 characters (depends on the browser).

The PUT method is defined as idempotent, which means that multiple identical PUT requests should have the same effect as a single request.

The following example demonstrates sending a PUT request to the server:

PUT Request Example Live Request
PUT /echo/put/json HTTP/1.1
Authorization: Bearer mt0dgHmLJMVQhvjpNXDyA83vA_PxH23Y
Accept: application/json
Content-Type: application/json
Content-Length: 85

  "Id": 12345,
  "Customer": "John Smith",
  "Quantity": 1,
  "Price": 10.00

And the server response:

Server Response
HTTP/1.1 200 OK
Content-Length: 19
Content-Type: application/json


Some notes on PUT requests:
  • PUT requests are never cached
  • PUT requests do not remain in the browser history
  • PUT requests cannot be bookmarked


Bookmarked Can be bookmarked Cannot be bookmarked
Cached Can be cached Not cached
Security GET is less secure compared to PUT because data sent is part of the URL

Never use GET when sending passwords or other sensitive information!


The fundamental difference between the POST and PUT requests is reflected in the different meaning of the Request-URI. The URI in a POST request identifies the resource that will handle the enclosed entity. In contrast; the URI in a PUT request identifies the entity enclosed with the request. Practically speaking, POST is used to append a resource to an existing collection, while PUT is used to update an existing resource.

Post HTTP Requests Online