in reply to http get with perl, help needed
Yes, I would.
use strict; use warnings; use LWP::UserAgent qw( ); use URI::Escape qw( uri_escape ); my $ua = LWP::UserAgent->new(); my $response = $ua->get(sprintf( 'http://test.test.com/ws/ws.asmx/DecryptText?text=%s&key=%s', uri_escape($text), uri_escape($key), )); if (!$response->is_success()) { die($response->status_line(), "\n"); } binmode STDOUT; print $response->content();
Update: s/\$ua->request/\$ua->get/ as per reply.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: http get with perl, help needed
by perlnewb123 (Sexton) on Oct 16, 2008 at 21:06 UTC | |
by ikegami (Patriarch) on Oct 16, 2008 at 21:06 UTC | |
by perlnewb123 (Sexton) on Oct 16, 2008 at 21:13 UTC | |
by perlnewb123 (Sexton) on Oct 16, 2008 at 22:03 UTC | |
by ikegami (Patriarch) on Oct 17, 2008 at 00:20 UTC | |
|