idhttp使用代理的问题

crazy_555 2006-06-07 05:16:22
某地使用代理上网
现有如下代码:
IdHTTP1.Host := '*************';//经确认正确(非IP)
IdHTTP1.ProxyParams.Clear;
IdHTTP1.ProxyParams.ProxyServer := '*****************';//经确认正确
IdHTTP1.ProxyParams.ProxyPort := 80;;//经确认正确
if CheckBox2.Checked = True then//有用户和口令情况下
begin
IdHTTP1.ProxyParams.ProxyUsername := '*******';//经确认正确
IdHTTP1.ProxyParams.ProxyPassword := '***********';//经确认正确
end;

IdHTTP1.Connect(4000);时确出现错误:Host not find

谁能解答下是我哪里写的不对,还是。。。。。。
...全文
165 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
erhan 2006-08-20
  • 打赏
  • 举报
回复
IdHTTP1.Connect(4000);时确出现错误:Host not find
这样用不对的,从你的代码里看不出想访问哪个url

直接mStr := IdHttp1.Get('http://www.sohu.com');
yanyading 2006-08-20
  • 打赏
  • 举报
回复
有没有用 http:// ?

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧