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. )