Ver Mensaje Individual
  #1  
Antiguo 02-09-2011
JuanOrtega JuanOrtega is offline
Miembro
NULL
 
Registrado: sep 2011
Posts: 130
Reputación: 15
JuanOrtega Va por buen camino
Ayuda con TidHTTP

Ando teniendo una duda sobre un codigo que vi en este mismo foro , el codigo es el siguiente

Código:
procedure TForm1.VerificarClick(Sender: TObject);
var
  IdHTTP: TIdHTTP;
  Response: String;
begin

  IdHTTP := nil;
  try

    IdHTTP := TIdHTTP.Create(nil);
    IdHTTP.Get(Trim(Edit1.Text));

    (* el edit1 tiene el link de descarga *)
    Response := IdHTTP.Get(Trim(Edit1.Text));

    Memo1.Text:= Response;

    if  IdHTTP.ResponseCode=404 then begin
    Label1.Caption:='link rroto';
   end else
    Label1.Caption:='link bueno';

  finally
    IdHTTP.Free;

  end;

end;
Mi duda es que cuando la pagina no existe el programa muestra error y se para ahi , mi duda es si se pueda evitar la ventana que dice "HTTP /1.1 404 Not Found." , que el error no se muestre y que el programa continue con sus labores como si nada hubiera pasado para poder seguir cargando otras paginas usando TidHTTP.


Perdon si no me exprese bien...
Responder Con Cita