❔ "proper" structure of the PUT endpoint
Whats better / more "proper" PUT request
- PUT
api/controller/{ID}
and then objectDTO in body
- PUT api/controller
and in body objectDTO with included ID3 Replies
The first option. PUT is "create or overwrite the specified resource, given by its URI"
slightly unrelated question, but maybe you know some libraries that add allow whole model be bound both from route and body?
For example, if I use CQRS in my app and I want to accept
UpdateEntityCommand
in the endpoint. But since id is passed in route there should be intermediate model or assignment after binding from bodyWas this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.