Modify URL for REST requests

Asked

Viewed 765 times

1

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

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

I needed to change the url of

/datasnap/rest/classmethods/ 

to another URL, I’ve been taking a look that could change in the properties DSContext, RESTContext e PathInfo of the component DSHTTPWebDispatcher1, for me to do this would have to change up the classmetodos, did not want to change this part.

I was wondering if you have a way to change the URL of Datasnap REST for access, beyond the one I mentioned.

  • Tb would like to make these modifications. As used the function created to fix the problem with Contest?

  • @Richardslater, did you manage to solve the problem?... I answered my question just below.

1 answer

2


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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.