the truly REST. Catalyst::Controller::REST and
CatalystX::Eta::Controller::REST only implement a JSON/YAML response, but lot of people would call those applications REST.
Please do not use XML respo
alystX::Eta::Controller::TypesValidation;
use Moose::Role;
use Moose::Util::TypeConstraints;
use JSON::MaybeXS;
sub validate_request_params {
my $self = shift;
my ( $c, %fields ) = @_;
se JSON::MaybeXS;
BEGIN { extends 'Catalyst::Controller::REST' }
__PACKAGE__->config(
default => 'application/json',
'map' => {
'application/json' => 'JSON',
'text/x-json'
=> 'JSON',
},
);
sub end : Private {
my ( $self, $c ) = @_;
#... do things before Serializing ...
my $code = $c->res->status;
if ( scalar( @{ $c->error } ) ) {
$code