KeepSafe/aiohttp — pull request #214 by asvetlov (2014-12-29 21:08:24+00:00)
Title: Add route options

On adding CORS support I figured out we need storage for custom parameters per route: CORS may be enabled for limited URLs only (while all work can be done in middleware which can live in separate aiohttp_cors library).

The solution is: add `**options` parameter to `router.add_route()` call.

The drawbacks are:
1. `options` names can clash between different middlewares (we cannot avoid it).
2. Maybe we add new params to `add_route` later, this will clash with existing names used by third party middlewares and other tools.

I prefer `router.add_route(..., my_name=val)` syntax instead of `router.add_route(..., {'my_name': val})` but the last can avoid problem number 2.

What do you prefer?