Welcome Guest, Not a member yet? Register   Sign In
Set headers on a request from a feature Test
#2

CodeIgniter also provides a Response class that is an object-oriented representation of the HTTP response.
This gives you an easy and powerful way to construct your response to the client:


PHP Code:
use CodeIgniter\HTTP\Response;

class
{
    $response service('response');

    $response->setHeader('Content-type''text/html');

    // Sends the output to the browser
    // This is typically handled by the framework
    $response->send();


CodeIgniter 4 User Guide - Working With HTTP Requests
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Set headers on a request from a feature Test - by InsiteFX - 07-29-2020, 03:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB