Page 1 of 1

Timeout Using http_stmf

Posted: Mon May 02, 2022 8:04 pm
by emhill
I am using the following to connect and post to a remote site. It then sends data back in JSON format:

Code: Select all

http_stmf( 'POST'              
         : claimurl            
         : resultpath          
         : jsonpath            
         : 'application/json');


I am getting a timeout error in the httpapi_debug.txt. If I run this using PostMan it works but takes about two minutes to connect and retrieve the data. Is there a default timeout on the http_stmf? This has been working for a while now but today decides to stop with the timeout errors.

I'm going to get with the receiving site to see if anything is amiss there as well.

Thanks!!!

Re: Timeout Using http_stmf

Posted: Mon May 02, 2022 9:14 pm
by Scott Klement
HTTPAPI ships with a default timeout of 60 seconds.

You can override it like this:

Code: Select all

http_setOption('timeout': '300');   // timeout = 5 minutes

Re: Timeout Using http_stmf

Posted: Mon May 02, 2022 9:54 pm
by emhill
Perfect!!!! Thanks Scott....