[dancer-users] Automatic JSON serializer breaks error page
Warren Young
warren at etr-usa.com
Fri Mar 14 22:58:49 GMT 2014
On 3/14/2014 07:46, Lee Carmichael wrote:
> hook before_error_init => sub {
This is a beautiful solution to the problem. Thank you!
We didn't have a formal API before, but fixing this problem gave me
sufficient reason to refactor the route handlers so that we do.
David makes a good point: route handlers that return JSON should be
distinguishable from those that return HTML. Putting them all under
/api/* accomplishes that.
Thank you both.
More information about the dancer-users
mailing list