Skip to main content

Is it possible to have a timeout when using the XMLHTTP Microsoft COM Object from COBOL?

  • April 3, 2013
  • 0 replies
  • 0 views

Microsoft have a XMLHTTP COM Object that can be used to issue HTTP requests against a server. Unfortunately this object does not any timeout function is an HTTP request is taking a long time to complete.

There is however a ServerXMLHTTP class that implements a setTimeouts method. This class compatable with the existing XMLHTTP module so you just need to change the class id in your code. For example:

XMLHTTP is class "$OLE$MSXML2.XMLHTTP.6.0"

to

XMLHTTP is class "$OLE$MSXML2.ServerXMLHTTP.6.0"

 

 

 


#COMMicrosoftXMLHTTPClass