Find Jobs
Hire Freelancers

perl code that requests a url and prints redirects

$30-100 USD

Completed
Posted about 14 years ago

$30-100 USD

Paid on delivery
I need some perl code that can take a LWP::UserAgent object and do a request on an HTTP::Request object, and if the request encounters HTTP redirect headers that the user-agent follows, it should print out each of the URLs that the user-agent is redirected to. For example: my $ua = LWP::UserAgent my $request = HTTP::Request->new('GET', '[login to view URL]'); # your code goes here Then the page <[login to view URL]> redirects to [login to view URL] and that page redirects to [login to view URL] So the code should output something like: redirected to <[login to view URL]> redirected to [login to view URL] In other words, if there's more than one redirect (this example has two), the code should output each redirect, not just the last one. I think this can be done with a "callback" function or something, but I can't find how to do it. This is probably a really simple problem (the solution is probably only about two or three lines of code) so you can either submit a bid, or if you want you can even submit a solution as a comment and I'll send you a tip of it works, since it's such a small job. ## Deliverables Basically as described above. ## Platform It's probably not a platform-dependent thing, but it has to work for me on Perl 5.8.8 with CentOS 5.4.
Project ID: 3283505

About the project

1 proposal
Remote project
Active 14 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
See private message.
$2 USD in 14 days
5.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
Bellevue, United States
5.0
128
Payment method verified
Member since Oct 24, 2004

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.