You are not logged in.
Pages: 1
Is it possible to re-route requests to existing REST server methods?
I tried adding:
aRestServer := TVspsRestServer.CreateWithOwnModel([], False, 'vsps');
try
aHttpServer := TRestHttpServer.Create(SERVER_PORT, [aRestServer], '+', useHttpSocket);
try
aHttpServer.AccessControlAllowOrigin := '*';
aHttpServer.Route.Get('/vsps/test', '/vsps/createport');
but am getting a 400 - Bad Request when I try a GET on /vsps/test.
the method is defined as:
procedure TVspsRestServer.CreatePort(Ctxt: TRestServerURIContext);
Offline
Sorry... my bad! it's working... it ran into my catchall which was returning the code 400.
Offline
Pages: 1