Catmandu-MediaHaven
view release on metacpan or search on metacpan
lib/Catmandu/MediaHaven.pm view on Meta::CPAN
my $client = REST::Client->new();
if ($body) {
my $response = $client->getUseragent->request(POST $url , $body , Content_Type => 'form-data');
if ($response->is_success) {
return { ok => 1};
}
else {
my $json = $response->decoded_content;
return decode_json $json;
}
}
else {
$client->POST($url);
my $json = $client->responseContent();
my $location = $self->_rest_base( $client->responseHeader('Location') );
my $perl = decode_json $json;
( run in 0.352 second using v1.01-cache-2.11-cpan-26ccb49234f )