You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A self or item link may support more than one action upon it, therefore we need to use the method and relation as a composite unique key.
The following things may need considering.
Offer .Replace(object model) and .Delete() steps with no parameters to act upon the current resource but checks whether the current resource has these links.
Some actions after deleting a resource make no sense. For example, deleting an entire subset may return an empty set, plus links, so To and Submit might be the only rational next steps. Consider this when designing the return type from a .Delete().
Because submitting on a simple read can feel odd, add .To("orders", new { skip = 10, take = 10 }) which submits with a Get. This bakes in a link between the step name To and the HTTP method name Get. Submit should continue to use/choose most appropriate HTTP method from the controls on offer.
Throw when cannot work out the most appropriate method to use for the step and rel.
To = GET, POST
ToItem = GET
Submit = GET, POST, PUT, match in that order on first with compatible inputs
Replace = PUT + payload
Delete = DELETE
Design above forces deletes to be done by getting the resource first, use ifmatch in control or from last response
The text was updated successfully, but these errors were encountered:
A
self
oritem
link may support more than one action upon it, therefore we need to use the method and relation as a composite unique key.The following things may need considering.
Offer
.Replace(object model)
and.Delete()
steps with no parameters to act upon the current resource but checks whether the current resource has these links.Some actions after deleting a resource make no sense. For example, deleting an entire subset may return an empty set, plus links, so To and Submit might be the only rational next steps. Consider this when designing the return type from a
.Delete()
.Because submitting on a simple read can feel odd, add
.To("orders", new { skip = 10, take = 10 })
which submits with a Get. This bakes in a link between the step name To and the HTTP method name Get. Submit should continue to use/choose most appropriate HTTP method from the controls on offer.Throw when cannot work out the most appropriate method to use for the step and rel.
To = GET, POST
ToItem = GET
Submit = GET, POST, PUT, match in that order on first with compatible inputs
Replace = PUT + payload
Delete = DELETE
The text was updated successfully, but these errors were encountered: