put your SPORE config :
base_url: http://localhost:4500
version: 0.2
format:
- json
- xml
- yml
methods:
get_object:
required_params:
- id
{
my $str_error = shift;
my $code_error = shift;
$code_error ||= 400;
set serializer => 'JSON';
debug $str_error."\n";
#return halt(send_error($str_error,400));
if ($code_error == 400)
set serializer => 'JSON';
_set_access_control_header($methods);
status 200;
return halt('{"status":200,"message":"OK"}');
}
else{
set serializer => 'JSON';
status 404;