Here's a question for you RESTful nerds. Allow me to set the stage.
Say I have a remote system called ChickenShack and a local system called BurgerShack, both of which are integrated such that each system maintains a "synchronized" copy of entity data. When a change occurs to entities on ChickenShack, it sends a collection of the IDs of those entities as a RESTful request to BurgerShack. BurgerShack then issues a GET request to ChickenShack, requesting all the attributes of a changed entity and updates the local copy of the entity.
All of this is asynchronous and is designed around certain constraints (so if it tastes bad to you, realize that in life sometimes we have to eat shit and smile).
My question is: should the initial request issued from ChickenShack to BurgerShack be a GET or a PUT request? Since the initial request is idempotent, part of me says "GET". Yet, it does ultimately result in data being changed on Burger, so another part of me says "PUT" or "POST."
What do you think?
I'd opt for a POST
because:
PUT
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With