0;
use strict;
use warnings;
our $VERSION = '0.001001';
use Carp qw/croak/;
use HTTP::Tiny;
use JSON::MaybeXS;
use Scalar::Util qw/blessed/;
my $ht = HTTP::Tiny->new(
agent => "WebService-Sca
s->{headers}{'X-Auth-Token'} = $$self if $$self;
$opts->{headers}{'Content-Type'} = 'application/json';
my $ret = $ht->request($method, $url, $opts);
die 'Request to Scaleway API server was unsucce
. $ret->{status} . ' ' . $ret->{reason} . '; ' . $ret->{content} unless $ret->{success};
decode_json $ret->{content} if $ret->{status} != 204;
}
sub _get { shift->_request(GET => @_) }
sub _p