3 ms·
I think that a canceled booking is still a booking, just a cancelled one. Here is wording from the HTTP spec "However, the server SHOULD NOT indicate success u
by artsrc 15y ago
I think that a canceled booking is still a booking, just a cancelled one.
Here is wording from the HTTP spec "However, the server SHOULD NOT indicate success unless, at the time the response is given, it intends to delete the resource or move it to an inaccessible location. "
I don't expect the server to move the booking to an inaccessible location so I see this as a state change not a delete. Hence I am thinking PUT, not DELETE.
- bodhi 15y agoExactly, it depends on the semantics. For example, if I'm exposing a salon's schedule as a resource, perhaps when a booking is cancelled it is thrown away (or otherwise made inaccessible). But in your case, you would still want make the cancelled booking available to REST clients, so PUT would be more suitable for you.