In a VBScript, having instantiated:
On Error Resume Next
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
I am doing a sequence of synchronous HTTP PUTs like this:
xmlhttp.open "PUT", TheURL, False
xmlhttp.setRequestHeader "Content-type","application/json"
xmlhttp.setRequestHeader "Accept","application/json"
xmlhttp.send TheXML
If xmlhttp.readyState <> 4 Then
xmlhttp.waitForResponse 1
End If
If xmlhttp.status >= 300 Then
WScript.Echo "Failure: " & TheURL & "<BR>" & TheXML
End If
After a few I check for an error and discover:
-2147483638: The data necessary to complete this operation is not yet available.
Given that I have made these using synchronous calls, how is this possible? How can I avoid this error?