Here's a code sample - I have response.writes put in to see what's going on:
Here is the output I am getting:
1 - 11/6/2014 11:46:06 PM
rs = 1
3 - 11/6/2014 11:46:06 PM
rs = 1
Does this mean the onreadystatechange only fires once? Or is there some other problem?
Code:
dim o
set o = server.CreateObject("MSXML2.XMLHTTP")
o.open "GET", "[URL unfurl="true"]https://www.url.com/",[/URL] true
o.setRequestHeader "header1", "value1"
o.setRequestHeader "header2", "value2"
o.onreadystatechange = GetRef("checkReadyState")
o.send
sub checkReadyState()
response.Write("1 - " & Now() & "<br />")
response.Write("rs = " & o.readyState & "<br />")
if o.readyState = 4 then
response.Write("2 - " & Now() & "<br />")
response.Write(o.responseText)
else
response.Write("3 - " & Now() & "<br />")
response.Write("rs = " & o.readyState & "<br />")
end if
end sub
set o = nothing
Here is the output I am getting:
1 - 11/6/2014 11:46:06 PM
rs = 1
3 - 11/6/2014 11:46:06 PM
rs = 1
Does this mean the onreadystatechange only fires once? Or is there some other problem?