RESTful services created with Delphi's DataSnap provide a default mapping of prefixes for exposed REST methods from the DataSnap server based on the HTTP method type. These are as follows:
HTTP Method type Prefix Example
GET none MyValue
POST Update UpdateMyValue
PUT Accept AcceptMyValue
DELETE Cancel CancelMyValue
The documentation states "The mapping pattern can be overridden. The user can override the mapping for each type based on class name and method name parameters." However, I have utterly failed to find any documentation on how to do this. I want to change the prefix of my PUT from Accept to something else. How do I do that?
I should note that another posting here on StackOverflow (REST Datasnap override URI mapping) attempts to answer this question by pointing out that TDSHTTPService has methods for performing this mapping. That same post also references Marco Cantù's DataSnap white paper, which supposedly also describes how to do this. That white paper says "You can customize these mappings by handling the four corresponding event handlers of the DSHTTPWebDispatcher component."
In RAD Studio XE, both the TDSHTTPService and TDSHTTPWebDispather components had four specific events, corresponding to the four HTTP methods listed above, and which were designed for mapping the prefix. Those methods do not exist in XE2 and later.