You are not logged in.
Pages: 1
Hello,
I am about to create a kind of proxy-service for a number of internal REST services, so this proxy would act as single entry point.
I determined i have to override TSQLHttpServer.Request method for that, is this approach feasible?
If so, i would need a client-side component to make a request to internal REST services and return the results to the caller.
Is there such a component in the framework? Any advice and sample code are greatly appreciated.
Thanx,
Eugene.
Offline
I would rather combine the proxy at TSQLRestServer.URI level, not at HTTP level.
As i said i am completely new to the framework, so this says nothing to me actually...
Why would i better do it this way? What methods should i override etc?
Thanks.
Offline
If you start from a shared /root/... URI, you can override TSQLRestServer.URI, or just define method-based services to do the redirect for the whole Ctxt.
If you want to handle several /root1/... /root2/.. and so on, then TSQLHttpServer.Request is where to override.
Offline
If you want to handle several /root1/... /root2/.. and so on, then TSQLHttpServer.Request is where to override.
This is exactly what i need and seems like i figured it out correctly.
I am using internal THttpClientSocket to communicate to end points. What is the proper flow of methods when working with it, should i call .Open first?
Basically i am trying to get the following code working in Request
result := FClient.Get(vURL);
Ctxt.OutContent := FClient.Content;
Ctxt.OutContentType := FClient.ContentType;
But this is for GET method, should i use similar structures for others?
When i connect to end point in browser it opens up auth dialog so i can supply username/password.
Are these being usually handled in PUT? Sorry this is not essentially a framework questions, but rather HTTP-related in general....
Thanx alot.
Offline
Pages: 1