Delphi 2007 IXMLHTTPRequest Time out issue

允我心安 提交于 2019-12-10 11:39:16

问题


I'm using Delphi 2007 and have imported MSXML6_TLB. I'm using IXMLHTTPRequest object to send request to server.

Example:

XMLHttp := CoXMLHTTP60.Create;
try
  XMLHttp.open('POST', URL, False, EmptyParam, EmptyParam);
  XMLHttp.setRequestHeader('Content-Type', 'text/xml;charset=UTF-8');
  XMLHttp.send(reqXMLDoc.XML.Text); //--> timeout in 10 secs
  if (XMLHttp.readyState = 4) then
    StrStream.WriteString(UTF8Encode(XMLHttp.responseText));

XMLHttp.send() keeps timing out if response takes more than 10 secs. I've tested this in other systems and it works fine. But this issue occurs ONLY in my laptop Windows 7, IE 9. Any solutions is welcome. P.S. - Is there some registry settings that can override this behaviour.

来源:https://stackoverflow.com/questions/8925798/delphi-2007-ixmlhttprequest-time-out-issue

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!