1. Marcin Jurkowski
  2. PowerBuilder
  3. Friday, 2 October 2020 11:59 AM UTC

Hi,

I'm trying to set a timeout on the RESTClient.
At the moment if the API is unavailable the application waits for 20 seconds (this is a default action(?), I haven't changed anything).

I want this time to be reduced to 3 seconds.
When I set client timeout (to 0, 3 or 60) it doesn't change anything. It's always 20 seconds for me.

This is my sample code (PB 2017 R3 Build 1858). Am I doing something wrong?

RESTClient rest
rest = create RESTClient
rest.Timeout = 3
rest.Retrieve( dw_rest, "https://localhost:5001/api/client/abc")
dw_rest.RowCount()

 

Regards,
Marcin

Accepted Answer
mike S Accepted Answer Pending Moderation
  1. Friday, 2 October 2020 12:22 PM UTC
  2. PowerBuilder
  3. # Permalink

try setting SecureProtocol

see:

https://www.appeon.com/standardsupport/search/view?id=3364

 

 

Comment
  1. Marcin Jurkowski
  2. Friday, 2 October 2020 12:48 PM UTC
thank you Mike.

The solution works for me.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Friday, 2 October 2020 13:32 PM UTC
FYI: Related to ticket # 3364
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from this question.