Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Get redirected URL

by JavaFan (Canon)
on Aug 10, 2009 at 16:18 UTC ( [id://787369]=note: print w/replies, xml ) Need Help??


in reply to Get redirected URL

Looking at the LWP::UserAgent manual page and grepping for redirect gives a couple of options you can give as a parameter for new that may do what you want. Searching for redirect further down gives you a couple of useful handlers you can use. And even further down, we stumble upon:
$ua->simple_request( $request ) $ua->simple_request( $request, $content_file ) $ua->simple_request( $request, $content_cb ) $ua->simple_request( $request, $content_cb, $read_size_hint ) This method dispatches a single request and returns the res +ponse received. Arguments are the same as for request() describe +d above. The difference from request() is that simple_request() will + not try to handle redirects or authentication responses. The reque +st() method will in fact invoke this method for each simple requ +est it sends.
And if that's not enough, there's more that a search for redirect reveals in the manual page. There's also the redirect_ok callback.

Wouldn't you agree that grepping manual pages is much faster than writing a post on Perlmonks and waiting for an answer?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://787369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-24 21:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found