您的位置:首页 > 理论基础 > 计算机网络

delphi idhttp 使用方法

2009-05-15 12:43 369 查看
delphi idhttp 使用方法



IdHTTP1.Request.Connection:='Keep-Alive';
IdHTTP1.Request.UserAgent:='Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)';
IdHTTP1.Request.ContentType:='application/x-www-form-urlencoded';
IdHTTP1.Request.Referer:='http://www.xxx.com';
IdHTTP1.Request.Accept:='image/gif,
image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/msword, */*';
IdHTTP1.Request.AcceptLanguage:='zh-cn';
IdHTTP1.Request.AcceptEncoding:='gzip, deflate';
IdHTTP1.Request.CacheControl:='no-cache';
IdHTTP1.ReadTimeout:=60000;
IdHTTP1.HTTPOptions:=IdHTTP1.HTTPOptions+[hoKeepOrigProtocol];//关键这行
IdHTTP1.ProtocolVersion:=pv1_1;
sHtml:=IdHTTP1.Post('http://www.xxx.com/login.asp',sPost);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: