skariel
skariel

Reputation: 108

Play framework 2.0 calling a method before request is routed

I want to do some stuff with incomming requests just before they are routed to their corresponding methods. What I want to do is just the same, no matter what the actual route is. So instead of calling a method in each and every route method, there should be a way to "intercept" that request just prior.

Any ideas? Thanks!

Upvotes: 0

Views: 216

Answers (1)

Sivailango
Sivailango

Reputation: 564

You should use Action Composition in Play framework to do some thing before your action get invoked, See https://www.playframework.com/documentation/2.2.x/ScalaActionsComposition

Upvotes: 1

Related Questions