Hi People,
I've got a problem trying to use LWP with https and a POST command. Here is
the code snippet I am working with:
use lib 'perllib/LWP';
use HTTP::Request::Common qw(POST);
use LWP::UserAgent;
$url = "http://www.secure.server/secure_program.exe";
my $ua = LWP::UserAgent->new;
my $req = POST $url,
[
PA => $card, ED => $exp, TA => $amt, AC => '1', RE => $account, CA => $CA,
RS => 'NET', P3 => $email, P7 => $name, P8 => $phone
];
# Submit the info to the bank
$res = $ua->request($req)->as_string;
@result = split (/\n/, $res );
## do other stuff here ...
Changing the $url variable to https (rather than http) creates an error:
* 501 (Not Implemented) Protocol scheme 'https' is not supported
although manually going through and accessing the program (with no data)
allows me to touch the program and gives back an expected error. If I keep
the http protocol line and change ammend the $url string to have a :443 at
the end redirects me to the 404 page.
I've have a look through the LWP cook, and it mentions security as a
username/password combination, but doesn't really go into the https
protocol.
Is there an easy way to do this? Or some documentation for LWP that covers
https with a POST that can send me in the right direction?
Thanks
Richard
-J. Richard Mortimer -webmaster -Motorcharge [ABN 33 008 962 132] -
* P: (08) 9202 4087 *
* F: (08) 9242 2756 *
* e: [EMAIL PROTECTED] *
* e: [EMAIL PROTECTED] *
* w: http://www.motorcharge.com.au/ *
________________________________________________________________________
This Correspondence is Private and Confidential and is for the use of the
addressee only.
________________________________________________________________________
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web