I want to create a restful service that acknowledges a previous request and gets the next message in a single call. This saves on unnecessary calls to the server. Is it acceptable to perform two operations in a single rest call? If so what rest verb would you use as it seems like a combination of get and put?
Excuse my ignorance as this is new to me.
Here is one way to transfer state to a server, and in the response acknowledge the receipt of the content, whilst returning an additional response. There does not exist any mechanism in the protocol to do this generically, but you can create resources that perform these combined operations.
I’m using hal as media type just as an example because it has a well defined way of including links. Also, I am abusing the standard “next” link relation as you normally use a GET with next. You would probably need a custom link relation to really do what I am suggesting.