🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #251

TIdHTTP Get and OnRedirect (Indy 8)

#251
From: Eduardo Jauch
Date: Tue, 06 Feb 2007 22:09
24 lines
1491 bytes
I have this code:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
   AnsiString string = 
http->Get("http://www.visto-eua.com.br/agendamento-web/login?redirect=/agenciadores.do&locale=pt_BR&com.telecom.tipo_usuario=INTERNET");
   Memo1->Text = string;
}
//---------------------------------------------------------------------------

void __fastcall TForm1::httpRedirect(TObject *Sender, AnsiString &dest,
       int &NumRedirect, bool &Handled)
{
   Handled = true;
   return;
}


When I put the link on the browser, i can susseful see the redirected page.

How can I get this with the Indy? (I use indy 8 shiped with Borland )
What am I doing wrong?

Thanks! :)
Technical Details
Message-ID: <45c8f8fc@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,dc1b41359087c79,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 06 Feb 2007 20:09:04 -0200
From: Eduardo Jauch <eduardo.jauch@gmail.com>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.web
Subject: TIdHTTP Get and OnRedirect (Indy 8)
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 201.24.207.197
Message-ID: <45c8f8fc@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1170798844 201.24.207.197 (6 Feb 2007 13:54:04 -0800)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newsfeed.media.kyoto-u.ac.jp!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail