What is the difference between the verbs Patch and Put?

1

I do not want to fill them with useless text, since the question is very clear. In the faculty they taught me to use the verb Patch to make modifications and on the internet I see that Put is generally used. I would like someone to explain the difference between the two.

Greetings!

    
asked by Nacho Zve De La Torre 15.08.2018 в 16:25
source

2 answers

3

Here some definitions:

PUT is defined in Section 9.6 RFC 2616:

  

The PUT method requests that the attached entity be stored under the URI   of request provided. If the request URI refers to a   existing resource, the attached entity SHOULD be considered as   a modified version of the one that resides on the source server. Yes   the request URI does not point to an existing resource, and that URI can   defined as a new resource by the requesting user agent,   the source server can create the resource with that URI.

PATCH is defined in RFC 5789:

  

The PATCH method requests that a set of changes be applied   described in the request entity to the resource identified by the   Request URI.

I share this references that will be very useful:

PATCH & PUT

PUT vs PATCH

    
answered by 15.08.2018 / 17:42
source
0

It's simple, PUT is a complete replacement for the entity, PATCH only from one part

    
answered by 15.08.2018 в 16:31