I have a situation where I am grappling with REst GET and POST architecture philosophies in the real world.
I have a REst call that is idempotent in it’s nature. It requires a complex data type in it’s payload (an insurance policy in XML), does complex business logic on it and returns a premium. It does nothing on the state and so is essentially idempotent.
The REst call is a POST at present. The valid justification to this is that the message body is big and is likely to get dropped and get messy with internet explorer. However, it is also idempotent and violates GET Vs POST fundamentally.
Anyone faced this conundrum before? Thanks.
I have the same problem and my solution is pragmatic. My API uses POST even for idempotent when facing the GET request limitations, so:
I think there are other exceptions, but I can’t think one right now.
UPDATE: one more exception, if, for some reason, I don’t want a parameter to be visible in the request url I also use POST for idempotent.