2

How come with Catalyst::Controller::REST I keep getting this in dialog

[info] Could not find a serializer for an empty content-type

And, this to the browser

Cannot find a Content-Type supported by your client.

I have this line in my package..

__PACKAGE__->config(default => 'text/yaml');

I also have installed YAML::Syck and URI::Find per the docs

package Sampcat::Controller::Client::Holiday;

__PACKAGE__->config(default => 'text/yaml');                   

BEGIN { extends 'Catalyst::Controller::REST' }                 

sub holiday :Chained('../client') :Args :ActionClass('REST') {}

sub holiday_GET {                                              
  my ( $self, $c )  = @_;                                      
  $self->status_ok( $c, entity => {                            
    'foobar' => 1                                              
  } );                                                         
  $c->stash->{body} = "foo";                                   
}                                                              
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468

1 Answers1

1

See this bug on RT for more information

;tldr.. Change

__PACKAGE__->config(default => 'text/yaml');

to

__PACKAGE__->config(default => 'text/x-json');

for the time being.

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
  • 1
    You might want to[ add a git issue](https://github.com/perl-catalyst/Catalyst-Action-REST/issues) and ping jnap in #catalyst. He's pretty active at the moment. – simbabque Aug 13 '15 at 09:29