Hallo möchte mich am Webserver anmelden,
wie bekomme ich die Information, onb der Login erfogreich war? True / False
Delphi-Quellcode:
procedure TForm1.Button1Click(Sender: TObject);
var
HTTP: TIdHTTP;
SSL: TIdSSLIOHandlerSocketOpenSSL;
begin
HTTP := TIdHTTP.Create;
try
SSL := TIdSSLIOHandlerSocketOpenSSL.Create;
try
HTTP.IOHandler := SSL;
HTTP.Request.BasicAuthentication := True;
HTTP.HandleRedirects := True;
HTTP.Request.Username := Edit1.Text;
HTTP.Request.Password := Edit2.Text;
finally
SSL.Free;
end;
finally
HTTP.Free;
end;
end