ef
push @INC, '/', @base;
};
use parent qw { Chef Chef::Header };
use LWP::UserAgent;
use Mojo::JSON;
sub new {
my $class = shift;
my $self = $class->SUPER::new(@_);
bless $self, $class;
return $response;
}
sub post
{
my $self = shift;
my $param = {@_};
my $mojo_json = new Mojo::JSON();
my $response = $self->add_headers(
$self->header(
'Path' => $param->{'api_end_point'},
'Content' => $mojo_json->encode($param->{'data'})
)->hash
)
Client::attributes;
$Chef::REST::Client::roles::VERSION = 1.0;
# this module will be passed tha json parsed hash
# under ___data__() or variable.
# process it depending on the content expected.
su
ist all the cookbooks available.
$obj->cookbook()->list;
=cut
# this module will be passed tha json parsed hash
# under ___data__() or variable.
# process it depending on the content expected.
su
base; #REST
pop @base; #Chef
push @INC, '/', @base;
};
use parent qw { Chef::REST };
use Mojo::JSON;
use Module::Load;
use vars qw { $AUTOLOAD };
sub new {
my $class = shift;
my $param = {@_};
lf = shift;
my $end_point = $self->api_end_point;
my $mojo_json = new Mojo::JSON();
my $list_of_roles =
$mojo_json->decode(
$self->ua( 'client_name' => $self->name
:attributes;
$Chef::REST::Client::environments::VERSION = 1.0;
# this module will be passed tha json parsed hash
# under ___data__() or variable.
# process it depending on the content expected.
su
irname(__FILE__) ) ) );
pop @base; #REST
pop @base; #Chef
push @INC, '/', @base;
};
use Mojo::JSON;
sub new {
my $class = shift;
my $param = {@_};
my $self = {};
bless $self, $class;
b ___data___
{
my $self = shift;
my $result = shift;
my $mojo_json = new Mojo::JSON();
$self->{'___data___'} =
$mojo_json->decode( $result )
if defined $result;
r->{'Accept'} = $method if defined $accept;
$self->header->{'Accept'} = 'application/json' unless
defined $self->header->{'Accept'};
return $self->header->{'Accept'