Einzelnen Beitrag anzeigen

Paul Schmidt

Registriert seit: 7. Feb 2006
22 Beiträge
 
#3

AW: HTTP Download mit IdHTTP analog zu curl

  Alt 26. Sep 2010, 19:13
als Testcode völlig simple:
Delphi-Quellcode:
var
  stream:TFilestream;
begin
  stream:=TFilestream.create('C:\foo.zip',fmcreate) ;
  idhttp1.Request.Username := 'username';
  idhttp1.Request.Password := 'password';
  idhttp1.Get('url',stream);
  idhttp1.disconnect;
  FreeAndNil(stream);
end;

Das Login auf der Seite funktioniert. Die login-Abfrage kommt.

Allerdings ist das Ergebnis als "foo.zip":
"Authorization Required

This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
------------------------------------
Apache Server at..."
  Mit Zitat antworten Zitat