in reply to perl dancer route recive array of json via xmlhttp request
I don't use the serializers closely, but maybe your Javascript didn't send the correct MIME Content-Type headers so Dancer did not autodecode the content?
Personally, I would do the decoding and validating directly in Perl instead of hoping for the (runtime) setting of serializer being the correct one. Note that there is no distinction between input and output serialization, so if you switch the serializer to CGI (or whatever the "other" setting is) anywhere else in your program, it might be in the wrong state when you receive that input.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl dancer route recive array of json via xmlhttp request
by RamiD (Acolyte) on Oct 03, 2016 at 16:51 UTC | |
by Corion (Patriarch) on Oct 03, 2016 at 17:09 UTC |