Group
Extension

Matches 1

SMS-ClickSend ( F/FA/FAYLAND/SMS-ClickSend-0.02.tar.gz, FAYLAND, 2014; MetaCPAN )
SMS-ClickSend/lib/SMS/ClickSend.pm ( view source; MetaCPAN )
:ClickSend;

use strict;
use 5.008_005;
our $VERSION = '0.02';

use Carp;
use LWP::UserAgent;
use JSON;
use MIME::Base64;
use HTTP::Request;
use vars qw/$errstr/;

sub errstr { $errstr }

sub new {
  
($self, $url, $method, $params) = @_;

    $url = 'https://api.clicksend.com/rest/v2/' . $url . '.json';

    $params ||= {};
    $params->{method} = 'rest'; # we prefer rest

    my $uri = URI->new($
st($req);
    if (not $res->header('Content-Type') =~ /json/) {
        $errstr = $res->status_line;
        return;
    }

    return decode_json($res->decoded_content);
}

1;
__END__

=encoding utf-

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.