Only two methods should be supported by microservices: GET and POST.
GET
GET should be used to retrieve information and must not have any side effect.
POST
POST requests will create new objects and must be idempotent. An idempotent method means that the result of a successful performed request is independent of the number of times it is executed.
Updating a resource should use idempotency keys and update objects to avoid applying the same update more than once.
Idempotency
Idempotency guarantees, that for the same request (including request header & body), the same response occurs (read more on the idempotent behavior in Idempotency ) .
For REST API, the services offering idempotent processing should:
respect header
X-Idempotency-Key
with value UUID as the idempotency keyIn case request body is not identical with previous call for same UUID, Http code 406 is being returned.