2

I am working with Delphi 10 Seattle. Following samples we developed a REST Client that communicated with a remote server to consume Rest API. The REST Client works end until we tried to set a custom timeout for Request object.

The following snippet is ours code:

LClient: = TRESTClient.Create (URL);
LRequest: = TRESTRequest.Create (nil);
LRequest.Client: = LClient;
LRequest.Resource: = FReqParams.Resource;
LRequest.Method: = TRESTRequestMethod.rmGET;
LRequest.Timeout: = 300000;
LRequest.Execute;

We have tried to set the time to a diffrent value from deafult one but the request always close the connection after 30 seconds (the default value).
Is there something we had missed?
Can someone help me?

Thank you!

Sceik
  • 275
  • 1
  • 3
  • 13
  • Does it work as expected with a 5000 msec value (lower than the default)? – mjn May 22 '19 at 12:51
  • No, It doesn't even work with 5000 msec – Sceik May 23 '19 at 13:50
  • It works in 10.3, and it appears it was a bug that was fixed in 10.1 Berlin. https://quality.embarcadero.com/browse/RSP-12435 – Dale M May 24 '19 at 23:45
  • Thanks for the link to the bug. Based on the link it seems that the bug has been fixed but we tried it with Delphi 10.2 and the bug still exists. – Sceik May 30 '19 at 11:56

0 Answers0