nstant {
CONTENT_TYPE => "application/json",
SERIALIZE_FORMAT => 'json',
SR_ATTRS => {
json => [
{ # For serialize
if (my $err = value($res => "error")) {
return $err;
}
} else {
return "The response has not valid JSON format";
}
return "Unknown error";
}
1;
__END__
/mbutiny",
CONTENT_TYPE => "application/json; charset=utf-8",
SERIALIZE_FORMAT => 'json',
SR_ATTRS => {
json => [
{ # For serialize
.8 Perl/v5.16.3
< Connection: close
< Content-Length: 214
< Content-Type: application/json; charset=utf-8
<
{
"dsn" : "dbi:SQLite:dbname=/var/lib/mbutiny/mbutiny.db",
2.4.29 (Ubuntu)
< Connection: close
< Content-Length: 556
< Content-Type: application/json; charset=utf-8
<
{
"name" : "foo",
"error" : "",
"file" : null,