ecurityCenter::REST;
use warnings;
use strict;
use version;
use Carp ();
use HTTP::Cookies;
use JSON;
use LWP::UserAgent;
use Net::SecurityCenter::Error;
use Net::SecurityCenter::Utils qw(trim dump
else {
$request->header( 'Content-Type', 'application/json' );
if ($params) {
$request->content( encode_json($params) );
}
}
# Reset error
$self->{'
>code();
my $result = {};
my $is_json = ( $response_ctype =~ /application\/json/ );
# Force JSON decode for 403 Forbidden message without JSON Content-Type header
if ( $response_cod
;
use JSON;
use Pod::Usage;
use parent 'App::TenableSC';
use App::TenableSC::Utils qw(:all);
our $VERSION = '0.311';
@App::TenableSC::command_options = (
'output|format|f=s',
'json',
'dumper',
'verbose'
);
sub startup {
my ($self) = @_;
my @output_formats = qw/json table csv tsv yaml dumper/;
if ( $self->options->{'format'} ) {
if ( !grep { $self->
od2usage( -exitstatus => 0, -verbose => 0 );
}
}
$self->options->{'format'} ||= 'json';
foreach (@output_formats) {
$self->options->{'format'} = $_ if ( $self->options->{