justinfagnani / route

A client + server routing library for Dart
BSD 3-Clause "New" or "Revised" License
114 stars 40 forks source link

URL Redirect #1

Open krhebbar opened 11 years ago

krhebbar commented 11 years ago

Lets consider web application with login. It is very common that user bookmark logged in page and tries load it when there is no valid session, In such cases we need to redirect them to login page and after login redirect them back to the bookmarked URL. it would be nice we we can bake this feature in to the routing framework itself.

justinfagnani commented 11 years ago

I'm not sure what else needs to be done to support redirection, in the route package at least. The login URL can be represented by a UrlPattern and the query paramaters are available to its handler on the server.

There are places where utilities could help on the server, for instance a wrapper on HttpServer that supports filters, but that's outside the scope of this library. Do you have any other idea what we could do?