rhldonly1
rhldonly1

Reputation: 91

Play framework Reverse Routing

What exactly is reverse routing in play framework? I am new to Java and currently working on java play framework. I've read the play framework documentation but don't get any idea of reverse routing. Please help.

Upvotes: 3

Views: 1394

Answers (1)

Frederic A.
Frederic A.

Reputation: 3514

Routing is the process that will transform an http request's method and path into a controller call.

Reverse-routing is the opposite, it allows you to get a method and path from a controller call.

For example, when the browser sends GET /api/user/login, the router triggers a call to controllers.user.login(). Now the reverse router helps you when you wonder: how to have the browser make a call to controllers.user.login(), the reverse router will basically answer you: GET /api/user/login.

Upvotes: 6

Related Questions