jnwu has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
In the following snippet of code, I have a LWP useragent behind a proxy making a request, where the content body is saved to a file.
$ua = new LWP::UserAgent( keep_alive => 1 ); $ua->proxy(['http', 'https'], $proxy); $request = HTTP::Request->new('GET', 'http://www.google.com'); $response = $ua->request($request, '/root/content_file');
In doing so, the content_file is empty after executing the code, and the response object contains a '_content' member (suggesting to me that the content did not get transferred over to the file).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Empty content_file for LWP behind a proxy
by Anonymous Monk on Jun 03, 2014 at 00:31 UTC | |
|
Re: Empty content_file for LWP behind a proxy
by taint (Chaplain) on Jun 02, 2014 at 21:57 UTC |