fiorix/cyclone — pull request #109 by CactusCommander (2013-06-27 20:15:22+00:00)
Title: Create a fallback route that is called if no other route matches.  Fixes #108

Hello.

This adds a fallback route to cyclone's `RequestHandler` that is called when no other route matches. It also supports bottle style route decorators.

```python
class MainHandler(RequestHandler):
def get(self):
# This is called on get requests
self.write("This is a GET request.")

def default(self):
# This is called on all other requests.
self.write("This is a supported request that isn't a GET.")
```

And for bottle style routing:
```python
@route('/', method='get')
def get(web):
web.write("This is a GET request.")

@route("/", method='ANY')
def index(web):
web.write("This is a supported request that isn't a GET.")
```