HTTP PATCH

HTTP PATCH method is used to do partial modification to the HTTP resource on origin server. The existing PUT method is used to do complete replacement of the document on the origin server.

The PATCH method requests that a set of changes described in the request entity be applied to the resource identified by the Request- URI. If the Request-URI does not point to an existing resource, the server MAY create a new resource, depending on the patch document type (whether it can logically modify a null resource) and permissions, etc. [source]

Difference between PUT and PATCH

In a PUT request, the request body is considered to be a modified version of the resource stored on the origin server, and the client is requesting that the stored version be replaced.

With PATCH the request body contains a set of attributes that need to be modified to the resource currently residing on the
origin server to produce new version.

Scroll to Top