Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTTP Request problem... 1

Status
Not open for further replies.

kathas

Programmer
Nov 28, 2006
6
DE
I am using LWP to make HTTP Requests to a page that is supposed to redirect me somewhere. how can i see where does it redirect me?

Here is my code:

use strict;
use warnings;
use LWP 5.64;
my $browser = LWP::UserAgent->new;
my $content = $browser->post($url,
[
'name'=> "kathas"
]);
print $content->content;

Example if the name is kathas it redirects me to kathas.php
else to noone.php how can i see where does it redirect me?

The content ($content->content) is blank...

Thanx in advance for all help.
 
Ok i'm quite moving ahaid to the problem...
I see it has a 302 status... which means that it redirects me...
But still how can i find the page that i am being redirected to???
 
O my friend i owe this one i knew it were in the HEADERS
but all i never found the location object...

Thanx a lot pal...
 
read the module documentation next time. You would have found your answer right away.

- Kevin, perl coder unexceptional!
 
Are you kidding me i was reading the module's documentation two hours and couldn't find it... anyway thanx to Kirsle for spending his time...
 
Well, some of the documentation for modules is hard to understand, I tough the docs for LWP were pretty clear but maybe not. Kirsle is a great help.

- Kevin, perl coder unexceptional!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top