[dancer-users] Trying to use Dancer2::Plugin::REST, what did I do wrong?

Pierre M piemas25 at gmail.com
Sat Dec 7 10:59:31 GMT 2013


Indeed :)
After reading your message I'm glad I didn't have to investigate myself: I
would have struggled
On 7 Dec 2013 10:50, "sawyer x" <xsawyerx at gmail.com> wrote:

> You are fantastic.
>
>
>
> On Fri, Dec 6, 2013 at 6:30 PM, Yanick Champoux <yanick at babyl.dyndns.org>wrote:
>
>> On 13-12-06 11:22 AM, Yanick Champoux wrote:
>>
>>> I can reproduce the issue with Pierre's code. Weird. I'll have a deeper
>>> look.
>>>
>>
>> Urgh.
>>
>> So it seems that the response object is created before the serializer is
>> set. And, even worse, it's not the response's own serializer that is set,
>> but the global serializer for the application. Which means that we have
>> this delightful delayed slapstick act:
>>
>> $ curl localhost:3000/page.json
>> HASH(0x32fafd8)
>> $ curl localhost:3000/page.yaml
>> {"status":"404","title":"Error 404 - Not Found","message":"unsupported
>> format requested: yaml"}
>> $ curl localhost:3000/page.yml
>> {"some key":"value","something":"else"}
>> $ curl localhost:3000/page.json
>> ---
>> some key: value
>> something: else
>>
>>
>> Github issue will be created. Problem shall be solved. But only after my
>> coffee's drained. :-)
>>
>>
>> Joy,
>> `/anick
>> _______________________________________________
>> dancer-users mailing list
>> dancer-users at dancer.pm
>> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>>
>
>
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20131207/bc9de067/attachment.html>


More information about the dancer-users mailing list