her icon indicating copy to clipboard operation
her copied to clipboard

Feature request: PATCH support

Open olgagoruniar opened this issue 12 years ago • 2 comments

I propose to add support for PATCH verb.

Generally speaking, REST conventions suppose two different types of request for different actions:

PUT /resources/:id {"a":"abc","b":"cde"}

to specify new value of all object properties. In such a case not mentioned properties can be treated as having default or NULL value

and

PATCH /resources/:id {"b":"cde"}

to specify only changed properties. In such a case not mentioned properties are treated as not changed

What do you think about such feature support?

olgagoruniar avatar Feb 03 '14 10:02 olgagoruniar

:+1:

awendt avatar Mar 25 '14 07:03 awendt

FWIW, I was able to call save on an existing resource and have it use the PATCH method with the following code in my model:

class User
  include Her::Model
  method_for :update, :patch
  ...
end

chrisbaldauf avatar Jan 15 '16 21:01 chrisbaldauf