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.
- is there verb more consistent appending?
- 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:
- a post new uri gets interpreted append list.
- a query parameter on patch indicates changes should appended rather overwrite.
neither of these options, , not endorse using them.
Comments
Post a Comment