You are not logged in.
Pages: 1
Hi,
For an interface-based service is it possible for me to define the uri endpoint?
E.g. the service is defined as
ISampleService = interface...
So the uri is going to be at root/SampleService
Is there a setting to modify this so that the service enpoint is at root/Sample?
Offline
You can do this with the "Router" feature, at HTTP level.
You can "rewrite" the URI on the fly.
Offline
TOrmModel.Create([TPerson], 'API'); // API/SampleService
Offline
I followed ab's reply above and added some test code that I explored .
FHttpServer := TRestHttpServer.Create(APort, [FRestServer], '+', HTTP_DEFAULT_MODE, 32, secNone, '/' {aAdditionalUrl});
FHttpServer.Route.Rewrite(urmGet, '/', urmGet, '/myApi/myService/getTime');
Offline
Pages: 1