in reply to Re: OX and routing: how to declare something like /api/action.:format ($DEBUG++ MANIFEST)
in thread OX and routing: how to declare something like /api/action.:format
Wow, thank you! I never think about checking the tests, good thinking.
I've found this solution which works:
my @extensions = ('', '.json', '.yaml'); route "/api/action$_" => 'controller.action' for @extensions;
It's not elegant but I might figure out a way to make it look nicer in the future.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: OX and routing: how to declare something like /api/action.:format ($DEBUG++ MANIFEST)
by Anonymous Monk on Dec 08, 2013 at 16:31 UTC | |
by mascip (Pilgrim) on Dec 08, 2013 at 21:18 UTC | |
by tobyink (Canon) on Dec 08, 2013 at 23:45 UTC | |
by mascip (Pilgrim) on Dec 09, 2013 at 09:30 UTC |