Hello,I have a Play 2.0 framework that is working well and I want to be able to add a specific get parameter (known only by be) to all routes. That parameters should be ignore by routes.I explain.Suppose I have routes like :GET /add/:id controllers.MyController.add(id : Int)
GET /remove/:id controllers.MyController.remove(id : Int)What I want is, for example, that http://mydomain.com/add/77?mySecretParam=ok still goes to controllers.MyController.add(id : Int) and then I could get mySecretParam in request object. And the same for all my routes.Do you have any idea how can I do ?Thanks.Greg
you should be able to use parameters in query string without add them to route
eg :
http://mydomain.com/add/77? mySecretParam=ok
it will call this route
GET /add/:id controllers.MyController.add( id : Int)
Hello,Thanks for your answer. I know I can to that. But if I do not add mySecretParam to all my routes in route file, Play won't be happy. And I want to avoid adding that parameter to all my routes.
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/BOllS1tLC_QJ.
To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.