rest - Change a resource by deletion of existing followed by insertion of new. Still a PUT? -
i'm working on rest-like api. api have changing existing resource id:
/api/v1/admin/member/:id
i normal circumstances of course of study put
when changing resource.
but because of compromise leading simpler code, route first delete resource (and references it) , create new 1 based on input given form. in means , give same end result resource change.
question: should route put
or post
the expected behavior idempotent utilize put
, , create sure update occurs in transaction error between deleting , inserting not leave resource deleted.
rest
No comments:
Post a Comment