Modify URLs for REST requests

1

I have a service running in Delphi in DataSnap REST , to access any function of REST via link would be like this:

servidor:porta/datasnap/rest/classmethods/funcao/parametros

I needed to change the url from

/datasnap/rest/classmethods/ 

to another URL, I've been taking a look at what I could change in the DSContext, RESTContext e PathInfo properties of the DSHTTPWebDispatcher1 component, so I would have to change it to the classmetodos, I did not want to change that part.

I wanted to know if there is a way to change the URL of Datasnap REST to access, in addition to the one I mentioned.

    
asked by anonymous 07.10.2016 / 14:52

1 answer

2

I was able to solve as follows, I created a DataSnap Server project, in the ServerContainerUnit class that the project itself creates, it has a component where it is in charge of making the communication via Http , which would be HttpService in this component has the property DSContext and RESTContext where I could change, but even changing that way, my problem was not solved, so I had to change in the ServerMethodUnit class and create a function to solve.     

16.11.2016 / 14:54