Jump to content

Set Timeout for web services rest call using ASYRRESTCLI.EXEC_REST_WS


Recommended Posts

When launching a request via REST web service with the ASYRRESTCLI.EXEC_REST_WS instruction against a third party Endpoint, I need to control a certain time in which, if the Endpoint does not respond, to exit the call and return error by TimeOut.

Currently, if the Endpoint is stopped, the process runs and I don't know for how long, because when it took more than 15 minutes I stopped it.

Looking for information, I have tried putting this in the header parameters:
  # Add a parameter
  HCOD(1) = 'xxx-api-key'.
  HVAL(1) = '"'+PCONEXPWD+'"''
  HCOD(2) = 'Content-Type'
  HVAL(2) = '"application/json"''
  HCOD(3) = 'Keep-Alive'
  HVAL(3) = '"timeout=1"''

But it still does not stop at one minute

Thank you very much, in advance, for the answers.

Edited by Jose Ch.
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...