Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: How to get real address with LWP and redirects?

by szbalint (Friar)
on Sep 11, 2007 at 13:35 UTC ( #638296=note: print w/replies, xml ) Need Help??


in reply to How to get real address with LWP and redirects?

Sure. It's a bit tricky to wrap your head around it, because the HTTP::Response object you received contains the HTTP::Request object that was created when LWP encountered the (last) redirect. The request object contains the url you've been redirected to. It might be confusing to see that the request object can change, but it does so just as an added note, people shouldn't rely on it for example to determine the original url.

Anyway, you can access the url something like this:

$response->request->uri;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://638296]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2018-07-16 05:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (332 votes). Check out past polls.

    Notices?