uses Comobj;
var
url:string;
xmlHttp:Olevariant;
responseText:Widestring;
begin
url:='http://xxx.cn/xx.asp';
try
xmlHttp:=CreateOleObject('Msxml2.XMLHTTP');
xmlHttp.open('POST',url,false);
xmlHttp.setRequestHeader('Cookie', 'cookietest=testvalue');
xmlHttp.send('xxxx');
responseText:=xmlHttp.responseText;
if xmlHttp.status='200' then
begin
//--
end
else
begin
//--
end;
except
On E:Exception do
//--
end;
end;
delphi使用ajax添加一个cookie
最新推荐文章于 2021-08-05 17:52:41 发布