BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TIdHTTP Get and OnRedirect (Indy 8)

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web)
View previous topic :: View next topic  
Author Message
Eduardo Jauch
Guest





PostPosted: Wed Feb 07, 2007 4:09 am    Post subject: TIdHTTP Get and OnRedirect (Indy 8) Reply with 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! Smile
Back to top
Eduardo Jauch
Guest





PostPosted: Wed Feb 07, 2007 4:29 am    Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) Reply with quote



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! Smile


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





PostPosted: Wed Feb 07, 2007 4:45 am    Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) Reply with quote



"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





PostPosted: Wed Feb 07, 2007 5:22 am    Post subject: Re: TIdHTTP Get and OnRedirect (Indy 8) Reply with quote

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 Smile
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.