idhttp代理上网的问题 HTTP/1.1 407 Proxy Authen tication Required 异常(200)

  • 主题发起人 主题发起人 yexingdongwu110
  • 开始时间 开始时间
Y

yexingdongwu110

Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下const url = 'http://www.163.com'; mps := TStringList.Create(); _idhttp.ProxyParams.BasicAuthentication := False; _idhttp.ProxyParams.ProxyServer := '192.168.1.1'; _idhttp.ProxyParams.ProxyPort := 8081; _idhttp.ProxyParams.ProxyUsername := '111111'; _idhttp.ProxyParams.ProxyPassword := '111111';// _idhttp.OnAuthorization// _idhttp.OnSelectProxyAuthorization := _TIdOnSelectProxyAuthorization; // _idhttp.OnProxyAuthorization := _TIdOnProxyAuthorization; try try Memo1.Lines.Add(_idhttp.Post(url, mps)); Memo1.Lines.Add(_idhttp.ResponseText); Memo1.Lines.Add(intTostr(_idhttp.ResponseCode)); except on e : Exception do begin Memo1.Lines.Add(e.Message); Memo1.Lines.Add(e.ClassName); end; end; finally FreeAndNil(mps); end;HTTP/1.1 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy service is denied. )
 
方其它网站,不行的话那说明这个网站就不支持http1.get方法.要让他支持,好像需要设置http1的协议类型.
 
后退
顶部