HTTP Response

Learn how to create a new Inphinit project.

Change status code

Get or set status code and return last status code. Note: if the status has changed the Event::on('changestatus') event will be trigged

Set or remove response headers

Shortcut for set/remove header

Set or remove Content-Type header

Set Content-Type header or remove previously headers

Set cache or no-cache headers

Cache expires 1 week

use Inphinit\Http\Response; Response::cache(strtotime('+1 week'));

No-cache

use Inphinit\Http\Response; Response::cache(-1);

Force download header

{placeholder}

use Inphinit\Http\Response; Response::download('page.html');

{placeholder}

use Inphinit\Http\Response; Response::download('report.pdf');
Go to homepage
Star us on Github