全部博文(788)
分类:
2009-04-22 11:00:58
自顶。
try
oReq := CoXMLHTTP30.Create;
oReq.Open('POST', POST_URL + 'zhgs.asp', False,varNull,varNull);
iLength := Length(pXML);
oReq.setRequestHeader('Content-Length', IntToStr(iLength));
oReq.setRequestHeader('CONTENT-TYPE', 'application/x-www-form-urlencoded');
oReq.send(pXML);
end;
================================
不是那句执行不过去
而是你try了 后面又没跟进异常保护模块 怎么不会出错
你这样写
oReq := CoXMLHTTP30.Create;
try
oReq.Open('POST', POST_URL + 'zhgs.asp', False,varNull,varNull);
iLength := Length(pXML);
oReq.setRequestHeader('Content-Length', IntToStr(iLength));
oReq.setRequestHeader('CONTENT-TYPE', 'application/x-www-form-urlencoded');
oReq.send(pXML);
finally
oReq.free;
end;
end;