On Thu, Jan 4, 2018 at 10:33 PM, leledumbo via fpc-pascal <fpc-pascal@lists.freepascal.org> wrote: >> The problem is that the WS could take so long time that the entire request > will broke with a "time out". > > I suggest making the request handling asynchronous instead. So request will > only register and return some unique id to the requester, then do call to > the WS in background thread. An endpoint shall be provided that when given a > unique id will check whether the corresponding thread has finished executing > or not, returning 200 + response data when done, and 202 if still in > progress. This endpoint shall be called in regular interval by the > requester, until it finishes processing or your server dies (500).
Interesting, but I can't do this way. It should be just one call from client (desktop app and website) to my REST service. My service encapsulates the WS. As I wrote previously to Michael, if the WS do not respond in "X seconds", my service should forget it and return a "code Y". Best, Marcos Douglas _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal