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
currently ketting assumes that a post will result in creating a new resource.
However there are endpoint you might post to, that will not create such new resources but rather perform some kind of action (similar to a remote procedure call).
These Controller archetype endpoints (https://restfulapi.net/resource-naming/) could respond with a status 200 and arbitrary payload (maybe some related resource to the action that was performed)
It would be great if the Resource.post() function was a bit more flexible and processed a response body for status = 200 responses too.
Or maybe Controller archetype endpoints shouldn't be part of a HATEOAS API, or use a different HTTP verb to trigger the action?
The text was updated successfully, but these errors were encountered:
Hypermedia API POST responses can be 200 with a body, and that's OK (pun intended). It's useful for hypermedia APIs that use POST to send queries instead of using GET with URL params. I talk about how the client can control the response with a "Representation" profile mixin: https://level3.rest/profiles/mixins/representation
@mattbishop , having support for return=representation is also planned, but we'll handle that a little differently. Basically, we'll warm the cache with whatever was returned.
Hi,
currently ketting assumes that a post will result in creating a new resource.
However there are endpoint you might post to, that will not create such new resources but rather perform some kind of action (similar to a remote procedure call).
These Controller archetype endpoints (https://restfulapi.net/resource-naming/) could respond with a status 200 and arbitrary payload (maybe some related resource to the action that was performed)
It would be great if the Resource.post() function was a bit more flexible and processed a response body for status = 200 responses too.
Or maybe Controller archetype endpoints shouldn't be part of a HATEOAS API, or use a different HTTP verb to trigger the action?
The text was updated successfully, but these errors were encountered: