Get API Connectivity issue

We are trying to migrate our project fromRemoting SDK to Remoting SDK . Now everything is working fine except when we try to hit a Get API it returns status:500 (invalid path) we haven’t changed anything in our code while migrating.

I am uploading the two files for reference.
One is SBROIndyHTTPServer and other contains method CustomCommandGet from fServerDataModule.uSBROIndyHTTPServer.txt (1.4 KB) fServerModule-CustomCommandGet.txt (3.3 KB)



for GET methods, better to use the HTTPServer.OnCustomResponseEvent event.

see examples of usage at the Using OnCustomResponseEvent in a ROSDK Server topic

As I shifted my code to OnCustomResponseEvent. Since, there are no
OnCustomResponseEvent.txt (3.4 KB) ARequestInfo : TIdHTTPRequestInfo and AResponseInfo : TIdHTTPResponseInfo
which I was using. How can we include these in this method?



you can’t get raw Indy objects because class that holds them are placed to implementation section.
almost all request info can be received via aTransport or (aTransport as IROHTTPRequest) interfaces
all response info can be set via aResponse interface
aRequestStream, aResponseStream - incoming/outcoming streams
aHandled - should be set to True if you processed request.

for getting HTTP method (POST, GET, etc) you can use

(aTransport as IROHTTPRequest).GetMethod

for checking headers (ARequestInfo.RawHeaders.Values['accept'])


see more at

ofc, you can get access to TIndyHTTPTransport via aTransport.GetTransportObject and to his private properties via hacking:

    fRequestInfo: TIdHTTPRequestInfo;
    fResponseInfo: TIdHTTPResponseInfo;

but it isn’t usual way for usage