Описание тега http-patch
While PUT
uploads the entire resource of an already existing entity, PATCH
is used to send only the changed attributes of a resource to the server.
The PATCH
method was specified in RFC 5789, where its use is described as follows:
Several applications extending the Hypertext Transfer Protocol (HTTP) require a feature to do partial resource modification. The existing HTTP
PUT
method only allows a complete replacement of a document. This proposal adds a new HTTP method,PATCH
, to modify an existing HTTP resource.
It specifies the following differences to the PUT
method:
The difference between the
PUT
andPATCH
requests is reflected in the way the server processes the enclosed entity to modify the resource identified by the Request-URI. In aPUT
request, the enclosed entity 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. WithPATCH
, however, the enclosed entity contains a set of instructions describing how a resource currently residing on the origin server should be modified to produce a new version.
See this answer for more information.