APNS;
use 5.006;
use strict;
use warnings FATAL => qw(all);
use WebService::UrbanAirship;
use JSON::XS ();
use HTTP::Request ();
use HTTP::Response ();
use HTTP::Headers ();
use LWP::UserAgent ();
the headers
my $headers = HTTP::Headers->new();
# all data needs to be JSON
$headers->content_type('application/json');
# set the authentication headers here
$headers->authorization_basic
//g;
my $json;
if (scalar keys %args) {
delete $args{alias} unless $args{alias};
delete $args{tags} unless $args{tags} && ref $args{tags};
$json = JSON::XS::encode_json(\%args);