[FLOW3-general] Trying to REST ;)
Peter Russ
peter.russ at 4many.net
Thu Oct 20 10:59:40 CEST 2011
--- Original Nachricht ---
Absender: Oliver Wand
Datum: 19.10.2011 11:36:
> Dear all,
>
> currently I'm trying to implement a RESTful service based on the FLOW3
> RestController.
>
> Trying to get a list with "curl http://flow3.local/Rm.Rest/article" does
> work fine as expected.
>
> But using "article/1" doesn't not set the action to 'show' instead leads
> to an exception that "1Action" does not exist in the controller.
>
> The same goes with the other actions based on the RestController.
>
> Obviously my approach is wrong as I did it the way I kind-of was used to
> it from Zend.
>
> How does FLOW3 actually expect the arguments to be given?
>
> Any hints would be appreciated :-)
>
> Thanks,
>
> Oliver
You have to change the routes as FLOW3 expacts
@Package/@Controller/@Action. at Format
You could define @Package/@Controller/{uid}
and get this uid by reuqest->getArgument('uid')
Check the manual as this is described correctly how it works
Peter.
--
Fiat lux! Docendo discimus.
_____________________________
uon GbR
http://www.uon.li
http://www.xing.com/profile/Peter_Russ
More information about the FLOW3-general
mailing list