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);
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);
相关文章推荐
- delphi idhttp 使用方法
- [delphi]indy10 idhttp get方法
- 使用 idHTTP 获取 UTF-8 编码的中文网页 - 回复同学 "Delphi学习者" 的问题
- IDHTTP,IdCookieManager,webbrowsers的使用方法
- delphi的idhttp的get 和 post的使用
- [delphi]indy10 idhttp get方法
- Delphi Idhttp的 Get 和 Post 方法
- Delphi中强制IdHTTP使用HTTP1.1(转)
- delphi idhttp使用
- Delphi Idhttp的post方法
- delphi的idhttp的get 和 post的使用
- [delphi]indy idhttp post方法
- 学习indy组件之一idhttp的使用方法
- [delphi]indy10 idhttp get方法
- [delphi]indy idhttp post方法
- delphi IdHTTP实现Get方法下载文件,断点续传
- 使用 idHTTP 获取 UTF-8 编码的中文网页 - 回复同学 "Delphi学习者" 的问题
- Delphi 使用 IDHttp 获取文件最后修改时间
- Delphi Idhttp的get和post方法
- delphi的idhttp的get 和 post的使用