sponsored links

Collapse

Announcement

Collapse
No announcement yet.

HTTPAPI timeout - can I make it wait longer?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTPAPI timeout - can I make it wait longer?

    I have a program that picks up a file from a webserver using HTTPAPI like this:

    Code:
    http_debug(*ON);                                               
    
    URL = 'https://myurl/list/';    
    IFS = '/ecommerce/customer-list.csv';
    
    rc = http_url_get(URL: IFS);
    It is timing out. When I go to the URL with a browser and wait, it eventually gives me the file, but my program doesn't wait long enough and gives me a timeout error in the logfile /tmp/httpapi_debug.txt :

    Code:
    recvresp(): entered
    SetError() #43: CommSSL_Read:  timeout!
    recvresp(): end with timeout
    http_close(): entered
    Is there a way to make HTTPAPI wait longer before timing out?

  • #2
    Whoops, never mind! I see now that there is a timeout parameter that I was not using. When it is omitted, HTTPAPI uses the default value 60 seconds.

    So now my call looks like this:

    Code:
    rc = http_url_get(URL : IFS : TIMEOUT);
    and I gave TIMEOUT a larger value than 60.

    Comment

    Working...
    X