json - Append HTTP verb -


i have (json for) resource @ /api/foo/1/

{name: "foo", bar_pks: [10, 11, 12]}

now want add api appending bar_pks. there no http verb appending can find. if patch /api/foo/1/ {bar_pks: [13]}, overwrite, not append.

  1. is there verb more consistent appending?
  2. if modify patch resource append, come bite me later?

(i using django , tastypie, prefer language agnostic answer.)

is there compelling reason not append on client side , use put/patch send updated value server?

i see couple of options if you're dead-set on doing this:

  1. a post new uri gets interpreted append list.
  2. a query parameter on patch indicates changes should appended rather overwrite.

neither of these options, , not endorse using them.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -