Bonjour,
Je rencontre des soucis lors de l'utilisation de IdHttp sur un proxy avec authentification.
Le sujet a déjà été traité plusieurs fois mais je n'ai trouvé aucune réponse à ce problème, je suis en Indy 9 et Delphi 7
Voici mon code :
J'obtiens toujours une erreur "#10060 impossible d'affecter l'url demandée"
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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);
Quelqu'un aurait il une solution ?
Merci d'avance.
Partager