public function setHeader(string $name, string $value)
    {
        switch ($this->type) {
            case 'psr-7':
                $this->response = $this->response->withHeader($name, $value);
                break;

            case 'laravel':
            case 'symfony':
                $this->response->headers->set($name, $value);
                break;

            case 'thinkphp':
                $this->response->header($name, $value);
                break;

            default:
                $this->response[$name] = $value;
                break;
        }

        return $this;
    }
public function setHeader(string $name, string $value)
    {
        switch ($this->type) {
            case 'psr-7':
                $this->response = $this->response->withHeader($name, $value);
                break;

            case 'laravel':
            case 'symfony':
                $this->response->headers->set($name, $value);
                break;

            case 'thinkphp':
                $this->response->header($name, $value);
                break;

            default:
                $this->response[$name] = $value;
                break;
        }

        return $this;
    }
public function setHeader ( string $ name , string $ value ) { switch ( $ this -> type ) { case 'psr-7' : $ this -> response = $ this -> response -> withHeader ( $ name , $ value ) ; break ; case 'laravel' : case 'symfony' : $ this -> response -> headers -> set ( $ name , $ value ) ; break ; case 'thinkphp' : $ this -> response -> header ( $ name , $ value ) ; break ; default : $ this -> response [ $ name ] = $ value ; break ; } return $ this ; }
Setting response headers.

@param string $name
@param string $value

@author Seven Du <shiweidu@outlook.com>
Setting response headers .