Thread View: borland.public.cppbuilder.internet.web
4 messages
4 total messages
Started by Eduardo Jauch
Tue, 06 Feb 2007 22:09
TIdHTTP Get and OnRedirect (Indy 8)
Author: Eduardo Jauch
Date: Tue, 06 Feb 2007 22:09
Date: Tue, 06 Feb 2007 22:09
24 lines
1491 bytes
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! :)
Re: TIdHTTP Get and OnRedirect (Indy 8)
Author: Eduardo Jauch
Date: Tue, 06 Feb 2007 22:29
Date: Tue, 06 Feb 2007 22:29
32 lines
1931 bytes
1931 bytes
Eduardo Jauch escreveu:
> 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! :)
The problem is that whe i try this code, what I get is the page that i
get if i pass the wrong password... But the login and pass (not provided
here) are ok and work in the browse...
Re: TIdHTTP Get and OnRedirect (Indy 8)
Author: Remy Lebeau (TeamB)
Date: Tue, 06 Feb 2007 22:45
Date: Tue, 06 Feb 2007 22:45
14 lines
1185 bytes
1185 bytes
"Eduardo Jauch" <eduardo.jauch@gmail.com> wrote in message news:45c8f8fc@newsgroups.borland.com... > When I put the link on the browser, i can susseful see the redirected page. > > How can I get this with the Indy? Get rid of the OnRedirect event handler altogether, and set the TIdHTTP's HandleRedirects property to True instead. Gambit
Re: TIdHTTP Get and OnRedirect (Indy 8)
Author: Eduardo Jauch
Date: Tue, 06 Feb 2007 23:22
Date: Tue, 06 Feb 2007 23:22
23 lines
1552 bytes
1552 bytes
Remy Lebeau (TeamB) escreveu: > "Eduardo Jauch" <eduardo.jauch@gmail.com> wrote in message > news:45c8f8fc@newsgroups.borland.com... > >> When I put the link on the browser, i can susseful see the > redirected page. >> How can I get this with the Indy? > > Get rid of the OnRedirect event handler altogether, and set the > TIdHTTP's HandleRedirects property to True instead. > > > Gambit > > Yet no results... Maybe a cookie problem? I know that these page sends cockies... How Indy 8 TIdHTTP handle cookies??? Thanks :)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads