perl - How do you change globally the default content type in Catalyst? -
i've tried with:
- myapp/lib/myapp.pm
__package__->config( ..., content_type => 'application/xhtml+xml' );
and with:
- myapp/lib/myapp/view/html.pm
__package__->config( ..., content_type => 'application/xhtml+xml', );
i'd do
$c->response->headers->content_type('text/plain');
in yourapp/controller/root.pm sub auto.
this should run before other controller (method) , should give reasonable default value.
Comments
Post a Comment