What to do when you need more verbs in REST

前端 未结 4 669
无人共我
无人共我 2021-01-30 11:32

There is another similar question to mine, but the discussion veered away from the problem I\'m encounting.

Say I have a system that deals with expense reports (ER). Yo

4条回答
  •  情歌与酒
    2021-01-30 11:41

    I think you are making it more complicated then it needs to be. Treat your expense report as a complete resource and any edits to it are simply a matter of PUTing a new representation to the URI where the resource lives. No need to have custom actions to change status, just GET the resource - make your edits - then PUT it back. Done.

提交回复
热议问题