Bosch-RCPPlus
view release on metacpan or search on metacpan
lib/Bosch/RCPPlus.pm view on Meta::CPAN
}
# Print command result
print 'Name: ' . $name->result . "\n";
=cut
use strict;
use URI;
use HTTP::Request;
use LWP::UserAgent;
use Bosch::RCPPlus::Response;
use Bosch::RCPPlus::AuthError;
sub new
{
my $proto = shift;
my $class = ref($proto) || $proto;
my %args = @_;
lib/Bosch/RCPPlus.pm view on Meta::CPAN
sub request
{
my ($proto, %args) = @_;
my @headers = ();
push @headers, @{$args{headers}} if ($args{headers});
my $uri = $proto->uri;
$uri->query_form($args{query}) if ($args{query});
my $request = HTTP::Request->new(
$args{method} || 'GET',
$uri,
\@headers,
$args{content}
);
return $proto->{ua}->request($request);
}
sub cmd
( run in 0.425 second using v1.01-cache-2.11-cpan-de7293f3b23 )