Method: content::type

Simplifies setting content type headers

Info

Syntax

content::type()

Parameters

Example


content::type('js');
// some javascript

content::type('png');
// some png 

content::type('text/rtf', 'iso-8859-1');    
// rtf document

/* 

more available shortcuts:

- html => text/html
- css  => text/css
- json => application/json
- jpg  => image/jpeg
- gif  => image/gif

*/