Response
A custom Response object can be returned to gain full control over the response type.
return [
'routes' => [
[
'pattern' => 'custom/response',
'action' => function () {
return new Response('<foo>bar</foo>', 'text/html');
}
]
]
];