(my $err = $tx->error) { Carp::croak $err->{message} }
my $data = $tx->res->json;
return $self->_result($tx->res->json);
}
sub get_p {
my ($self, $url) = @_;
$self->ua->get_p($url)->then(sub{
$err = $tx->error) { Carp::croak $err->{message} }
my $data = $tx->res->json;
return $self->_result($tx->res->json);
});
}
sub root {
my $self = shift;
return $self->{root} ||= $self->
n.
It replaces the existing IPMI "standard", such as it was, both in standardization and in using JSON over HTTP rather than binary protocols.
L<Mojo::Redfish::Client> is, as the name suggests, a cli
::Result;
use Mojo::Base -base;
use Carp ();
use Mojo::Collection;
use Mojo::Promise;
use Mojo::JSON::Pointer;
use Scalar::Util ();
my $isa = sub { Scalar::Util::blessed($_[0]) && $_[0]->isa($_[1])
et = Mojo::JSON::Pointer->new($self->data)->get($path);
return $self->_get($target);
}
sub get_p {
my ($self, $path) = @_;
return $self unless defined $path;
my $target = Mojo::JSON::Pointer-
my $target = Mojo::JSON::Pointer->new($self->data)->get($path);
$target = Mojo::Collection->new(@$target)
if ref $target eq 'ARRAY';
return $target;
}
sub TO_JSON { shift->data }
sub _