auraphp/Aura.Framework — pull request #44 by harikt (2013-09-08 06:27:12+00:00)
Title: Get the format from the Accept header.

Eg : `curl -i -H "Accept:application/json" http://localhost:8000/greet`

The action in the case will be like

```php
data->message = $this->context->getQuery('name', 'guys!');
// multiple views
$this->view = [
'.html' => 'index',
'.json' => 'greet.json.php',
];
$this->layout = [
'.html' => 'default',
'.json' => '',
];
}
}
```

```php
get('router_map')->add('example_package_greet', '/greet', [
'values' => [
'controller' => 'greet',
'action' => 'index',
],
]);
```

See we have not used any formats in the route. In the view index.php will be normal html, where as `greet.json.php`
will be json_encode($this->data);

I am interested to hear your thoughts on this.

Thanks