Rumtis has asked for the wisdom of the Perl Monks concerning the following question:
use LWP::UserAgent; use LWP::Debug qw(level); level('+'); my $url = 'https://www.myurl.com/cgi-bin/file-download'; $ENV{HTTPS_PROXY} = 'PROXY'; $ENV{HTTPS_PROXY_USERNAME} = 'PROXY_USERNAME'; $ENV{HTTPS_PROXY_PASSWORD} = 'PROXY_PASSWORD'; my $ua = LWP::UserAgent->new; $ua->proxy(['http','https']); my $response = $ua->post( $url, Content_Type => 'form-data', Content => [ userid => 'USERID', password => 'PASSWORD', recordlength => '', recordterminator => 'NONE', remotefilename => 'REMOTE_FILENAME' ] ); if ($response->is_success) { print $response->content; } else { die $response->status_line; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CrLf getting inserted into an octet-stream (gzip file)
by Corion (Patriarch) on May 23, 2008 at 13:31 UTC | |
by Rumtis (Initiate) on May 23, 2008 at 17:11 UTC | |
by Corion (Patriarch) on May 23, 2008 at 17:16 UTC | |
by Rumtis (Initiate) on May 23, 2008 at 17:30 UTC | |
by MidLifeXis (Monsignor) on May 24, 2008 at 13:27 UTC | |
| |
|
Re: CrLf getting inserted into an octet-stream (gzip file)
by moritz (Cardinal) on May 23, 2008 at 13:28 UTC |