 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eduardo Jauch Guest
|
Posted: Wed Feb 07, 2007 4:09 am Post subject: TIdHTTP Get and OnRedirect (Indy 8) |
|
|
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!  |
|
| Back to top |
|
 |
Eduardo Jauch Guest
|
Posted: Wed Feb 07, 2007 4:29 am Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) |
|
|
Eduardo Jauch escreveu:
| Quote: | 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... |
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Wed Feb 07, 2007 4:45 am Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) |
|
|
"Eduardo Jauch" <eduardo.jauch (AT) gmail (DOT) com> wrote in message
news:45c8f8fc (AT) newsgroups (DOT) borland.com...
| Quote: | 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 |
|
| Back to top |
|
 |
Eduardo Jauch Guest
|
Posted: Wed Feb 07, 2007 5:22 am Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) |
|
|
Remy Lebeau (TeamB) escreveu:
| Quote: | "Eduardo Jauch" <eduardo.jauch (AT) gmail (DOT) com> wrote in message
news:45c8f8fc (AT) newsgroups (DOT) 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  |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|