=head1 DESCRIPTION
This is a simple wrapper around either of the two available SSL
-modules.
+modules. It offers a unified API for send GET and POST requests over HTTPS
+and receiving responses.
It depends on Net::SSLeay _or_ ( Crypt::SSLeay and LWP::UserAgent ).
# accept a hashref or a list (keep it ordered)
my $post_data = {};
if ( exists($opts->{'args'}) && ref($opts->{'args'}) eq 'HASH' ) {
- $post_data = shift;
+ $post_data = $opts->{'args'};
} elsif ( exists($opts->{'args'}) && ref($opts->{'args'}) eq 'ARRAY' ) {
tie my %hash, 'Tie::IxHash', @{ $opts->{'args'} };
$post_data = \%hash;
}
$opts->{'port'} ||= 443;
- $opts->{"Content-Type"} ||= "application/x-www-form-urlencoded";
+ #$opts->{"Content-Type"} ||= "application/x-www-form-urlencoded";
### XXX referer!!!
my %headers = ();
# accept a hashref or a list (keep it ordered). or a scalar of content.
my $post_data = '';
if ( exists($opts->{'args'}) && ref($opts->{'args'}) eq 'HASH' ) {
- $post_data = shift;
+ $post_data = $opts->{'args'};
} elsif ( exists($opts->{'args'}) && ref($opts->{'args'}) eq 'ARRAY' ) {
tie my %hash, 'Tie::IxHash', @{ $opts->{'args'} };
$post_data = \%hash;