Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Netzwerke (https://www.delphipraxis.net/14-netzwerke/)
-   -   Delphi indy http mit authorisierung (https://www.delphipraxis.net/93804-indy-http-mit-authorisierung.html)

ghost007 11. Jun 2007 16:02


indy http mit authorisierung
 
Hallo,
ich möchte per
Delphi-Quellcode:
idhttp.get(URL);
eine mit username und passwort geschüzte seite bekommen.
Aber idhattp hat keine username oder passwort property.
Wie bekomm ich nun die athorisierung für die seite? (Passwort und Username hab ich vorliegen)

MfG - Ghost007

Master-of-Magic 11. Jun 2007 16:13

Re: indy http mit authorisierung
 
Zitat:

Zitat von ghost007
Aber idhattp hat keine username oder passwort property.

Um was wollen wir wetten? :wink:

Delphi-Quellcode:
HTTP := TIdHTTP.Create(nil);         // HTTP-Kompo wird dynamisch erstellt
with HTTP do
begin
  Request.BasicAuthentication := True;
  Request.Username := 'user';
  Request.Password := 'password';
end;
Klappt bei mir (Indy 10) wunderbar. Und sollte bei älteren auch möglich sein ...

ghost007 11. Jun 2007 16:24

Re: indy http mit authorisierung
 
ja, hab die request property auch grad gefunden :oops: wobei es bei mir wegen dem
Delphi-Quellcode:
BasicAuthentication := True;
nicht geklappt hat, wusste nicht das man des true setzen muss, danke :)

MfG - Ghost007


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:02 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz