0

I'm trying to check a webpage if it is logged in or not. For that I used win http GET request for google to test it. But i'm getting

"The Operation Timed Out" Error

after Send command.

Also Tried with xmlHTTP and serverxmlHTTP.

Dim xmlHTTP As Object
Dim html As Object
Dim url As String


url = "https://www.google.com/"

'
'Set xmlHTTP = CreateObject("MSXML2.XMLHTTP")

Set xmlHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

xmlHTTP.SetTimeouts 10000, 10000, 10000, 10000


xmlHTTP.Open "GET", url, False
'xmlHTTP.setRequestHeader "Content-Type", "text/xml"
xmlHTTP.send

Set html = CreateObject("htmlfile")
html.body.innerHTML = xmlHTTP.responseText

"The Operation Timed Out" Error after Send command.

ArunBabu
  • 25
  • 1
  • 6
  • 2
    `html.body.innerHTML = xThemlHTTP.responseText` can not work if you are not defining `"xThemlHTTP"`. Maybe `html.body.innerHTML = xmlHTTP.responseText`? – David García Bodego Oct 31 '19 at 07:39
  • Sorry that waws typo error when posting on here. I have edited the info. – ArunBabu Oct 31 '19 at 09:15
  • I have tried your code as it is and it is working. Could you show your error? – David García Bodego Oct 31 '19 at 09:30
  • Same here, with the exception of using `Set xmlHTTP = CreateObject("MSXML2.ServerXMLHTTP")` instead of `Set xmlHTTP = CreateObject("MSXML2.XMLHTTP")`, as the latter doesn't support `.SetTimeouts`. Works with both WinHTTP and MSXML2. So I suspect some kind of interference (Firewall / AV software) at your end. No timeout error here. – Hel O'Ween Oct 31 '19 at 09:38

0 Answers0