Subject: | Allow POST requests to have different content-type than responses |
Date: | Wed, 25 Jun 2014 11:34:38 +0100 |
To: | bug-Catalyst-Action-REST [...] rt.cpan.org |
From: | Kieron Taylor <ktaylor [...] ebi.ac.uk> |
Relating to issue #46974 , we're trying to get our REST service to
respond in a different content-type to that of the request, but slammed
into the improper priority of content-type over accepts.
On closer inspection, it appears that the lookup for content-type =>
serializer is the same as content-type => deserializer, meaning that
even when we hacked up a local override for the priority code in
Catalyst::TraitFor::Request::REST, it used the Accept header to choose
both the serialization and deserialization.
In particular this symmetry affects our ability to support JSONP, since
users do not submit JSONP to the service, but do expect it in return.
I hope that somebody can take the time to improve this situation in the
future, so that we can remove all of the duct-tape from our service.
--
Kieron Taylor
Ensembl Core team
www.ensembl.org