1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| IdHttp:=TIdHttp.Create(Application);
if RecupererCoche(CadreProxy) then
begin
IdHttp.ProxyParams.ProxyServer := RecupererChaine(Serveur);
IdHttp.ProxyParams.ProxyUsername := RecupererChaine(Utilisateur);
IdHttp.ProxyParams.ProxyPassword := RecupererChaine(MDP);
IdHttp.ProxyParams.ProxyPort := RecupererNombre(Port);
IdHttp.ProxyParams.BasicAuthentication := true;
IdHttp.Request.ContentLength := -1;
IdHttp.Request.ContentRangeEnd := 0;
IdHttp.Request.ContentRangeStart := 0;
IdHttp.Request.Accept := 'text/html, */*';
IdHttp.Request.BasicAuthentication := False;
IdHttp.Request.UserAgent := 'Mozilla/3.0 (compatible; Indy Library)';
IdHttp.HTTPOptions := [hoForceEncodeParams];
end;
{Requête}
URL:=RecupererChaine(UrlPath);
{Envoyer la requête}
Str:=IdHttp.Get(URL); |
Partager