Re: printing the redirections responses

Gisle Aas <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
"Octavian Rasnita" <[email protected]> writes:

> my $response = $ua->request($request);
> print $response->as_string();

[...]

> The response is the final page, even though there is a redirection until
> this page is returned. Is it possible to get and print that redirect HTTP
> header?

Just use $ua->simple_request() instead of $ua->request() to dispatch
the request.

--Gisle
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.