TIdHTTP.Get retourne une exception
J'utilise Delphi XE2.
Voila mon code est tres simple:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| uses (...), IdHTTP;
procedure TForm1.Button1Click(Sender: TObject);
var
HTTP : TIdHTTP;
Content : string;
begin
HTTP := TIdHTTP.Create(nil);
try
Content := HTTP.Get('http://www.djeda.fr');
ShowMessage(Content);
except
End;
HTTP.Free;
end; |
voici l'erreur :
Exception EIdHTTPProtocolException avec le message 'HTTP/1.1 403 forbidden'
Ce site fonctionne avec un explorateur (www.djeda.fr), alors pourquoi ai-je cette erreur avec mon application ?