Subject: | Catalyst::Controller::Rest and default types. |
Getting
[info] Could not find a serializer for an empty content-type
When I submit a request with,
Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding:gzip, deflate, sdch
Accept-Language:en,en-US;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:sentrydev
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/43.0.2357.130 Chrome/43.0.2357.130 Safari/537.36
First, I'd expect it to use "Accept", but even if not, the docs for Catalyst::Controller::Rest says,
By default, Catalyst::Controller::REST will return a 415 Unsupported Media Type response if an attempt to use an unsupported content-type is made. You can ensure that something is always returned by setting the default config option:
__PACKAGE__->config(default => 'text/x-yaml');
However, adding that line to my PACKAGE is no dice.
--
Evan Carroll
System Lord of the Internets
http://www.evancarroll.com