You are not logged in.
I am still trying to get any meaningful help on this wonderful resource....
How do i use THttpClientSocket when overring TSqlHttpServer.Request method to create a kind of proxy?
FClient := THttpClientSocket.Open('localhost', '8095');
result := FClient.Request(Ctxt.URL, Ctxt.Method, 10000, Ctxt.InHeaders, Ctxt.InContent, Ctxt.InContentType, TRUE);
Ctxt.OutContent := FClient.Content;
Ctxt.OutContentType := FClient.ContentType;
Ctxt.OutCustomHeaders := '';
for vIdx := Low(FClient.Headers) to High(FClient.Headers) do
Ctxt.OutCustomHeaders := Ctxt.OutCustomHeaders + #13#10 + FClient.Headers[vIdx];
The end point services are RESTful services, i need to be able to handle GET/POST/DELETE etc
The code above works fine for small responses, but when it comes to lengthy datasets returns it seems the response data never gets through.
Should i somehow create a loop to add to Ctxt.OutContent or it should be handled in some other way?
Offline
I am still trying to get any meaningful help on this wonderful resource....
Probably because you keep ignoring everyone telling you not to do this. This is a framework, but you decided not to use it like that, instead you want to do low level stuff but you don't understand it well. That's OK, that's why the framework will handle all the low level stuff for you, you just have to figure out what services you want to expose to the world and then implement it in the context of the framework by following the incredible documentation available to you.
Offline