I'm wondering if it is correct to use a PUT request with an empty body.
The service just clones an existing object and persists it with a new identifier, like
PUT /object/clone/{objectId}
Is this correct?
According to this (part about REST-methods):
https://docs.oracle.com/cd/E38689_01/pt853pbr0/eng/pt/tibr/concept_UnderstandingRESTServiceOperations.html
it is better to use the POST-request for this, as long as you are creating a new resource using the existing URL.
Since you are creating new element that is legitimate solution. Even better would be to use POST.
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