API-PureStorage
view release on metacpan or search on metacpan
lib/API/PureStorage.pm view on Meta::CPAN
my $debug = 0;
sub new {
my $class = shift @_;
my $self = {
cookie_file => '/tmp/cookies.txt',
host => $_[0],
token => $_[1]
};
bless $self, $class;
my $client = REST::Client->new( follow => 1 );
$client->setHost('https://'.$self->{host});
$client->addHeader('Content-Type', 'application/json');
$client->getUseragent()->cookie_jar({ file => $self->{cookie_file} });
$client->getUseragent()->ssl_opts(verify_hostname => 0);
$self->{client} = $client;
( run in 0.662 second using v1.01-cache-2.11-cpan-de7293f3b23 )