|
|
| "be consistent" | |
| PerlMonks |
Re: Need to test HTTP page responsesby b10m (Vicar) |
| on Oct 22, 2008 at 12:21 UTC ( #718721=note: print w/ replies, xml ) | Need Help?? |
|
As stated, LWP::UserAgent will be of help here, but make sure to look at the requests_redirectable option if you want to actually see if the URL returns a 300-code. If you leave HEAD and GET as requests_redirectable values, you'll get the results of the codes after the redirection.
In this case, the tinyurl URL will return 301. If you leave the request_redirectable option as default, you'll get 200 as status code (coming from perlmonks.org, not tinyurl.com).
-- b10m
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||