这是要点:
我有一个我想用asp打的电话,我不关心响应。我只想触发呼叫,我不希望页面等待响应。根据文档,它应该看起来像这样:
dim xmlhttp : set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", url, true '' setting the 'asynchronous' option to 'true'
xmlhttp.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8"
xmlhttp.setRequestHeader "Content-Length", Len(XMLData)
xmlhttp.send XMLData
这在同步调用时效果很好,但是当我将异步选项翻转为“true”时,什么都不会触发。我可以从互联网上收集到的是用户执行以下操作:
While xmlhttp.readyState <> 4
xmlhttp.waitForResponse 1000
Wend
如果您正在等待响应,我是否疯了,因为这看起来不再像是一个异步调用?
在发送之后立即放置该行将xmlhttp.waitForResponse 1
导致请求触发,但同样,我不想等待一秒钟。
有什么想法吗?