Delphi中indy8设置Authentication验证不通过
idHttp:= TIdHTTP.Create(nil);
RStream:=TStringStream.Create('');
idHttp.Host:=IpAddress;
idHttp.Port:=StrToInt(Port);
idHttp.Request.ProxyAuthenticate:='Basic MDowMDExMTExMTExMTE=';
idHttp.Request.ContentType:='text/xml';
idHttp.Request.ContentLength:=210;
idHttp.Request.Connection:='Keep-Alive';
idHttp.ProtocolVersion:=pv1_1;
if not idHttp.Connected then
idHttp.Connect;
WriteLog('上传xml:'+xmlstr);
sends:=tstringlist.Create;
sends.Add(xmlstr);
idhttp.Post(url,sends,RStream);
Result:=RStream.DataString;
WriteLog('Http返回:'+Result);