mcavage/node-restify — pull request #504 by rprieto (2013-12-23 22:43:13+00:00)
Title: Add helper to render a route with given parameters (for hypermedia APIs)

This is a new helper method for building hypermedia-driven APIs.
I didn't find any existing functionality for that, please let me know if I missed it!

Example taken from the tests:

```js
// configuring named routes
var server = restify.createServer();
server.get({name: 'cities', path: '/countries/:name/states/:state/cities'}, doSomething);

// somewhere in another route...
var cities = server.router.render('cities', {name: 'Australia', state: 'New South Wales'});
// will be /countries/Australia/states/New%20South%20Wales/cities
```

This is useful for the typical hypermedia API:

`GET /countries/Australia`

```js
res.send(200, {
"population": 23000000,
"capital": "Canberra",
"cities": {
"NSW": "/countries/Australia/states/New%20South%20Wales/cities",
"VIC": "/countries/Australia/states/Victoria/cities"
}
});
```