开发者

Timeout for a HTTP Resquest

Is there another ProgID instead of "MSXML2.XMLHTTP" that lets you set a timeout in VBScript? OnReadyStateChange or similar must also work in VBScript.

Set oHTTP = CreateObject("MSXML2.XMLHTTP")
oHTTP.timeout = 10000 'Throws an error
oHTTP.Open "GET", "http://www.google.com", True

oHTTP.OnReadyStateChange = GetRef("oHTTP_OnReadyStateChange")

Sub oHTTP_OnRea开发者_运维问答dyStateChange
    ' do something
End sub

oHTTP.Send


You can use either ServerXmlHttp with setTimeouts, or just use windows.XMLHttpRequest instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜