10.1 Delete Example
A resource is deleted by sending a DELETE request on its URL. For example:
DELETE /sdata/myApp/myContract/-/salesOrders('43661') If-Match: STFtZgHEkPz7TyH98YEmWA==
If the operation succeeds, the service provider sends the following response:
The delete operation doesn’t send the Atom entry, the URL is sufficient. Similarly, a successful response doesn’t return any Atom entry.
Some HTTP infrastructures do not support the DELETE method. In such cases, the request SHOULD be submitted as a POST with an additional X-HTTP-Method-Override header set to DELETE. The request becomes:
POST /sdata/myApp/myContract/-/salesOrders('43661') X-HTTP-Method-Override: DELETE If-Match: STFtZgHEkPz7TyH98YEmWA==
SData providers MUST support delete operations on all resource kinds that have the sme:canDelete flag set to true. SData providers SHOULD support POST with the X-HTTP-Method-Override header as an alternative to the DELETE method.