public function getHeadersAsString($status = true, $eol = "\n")
    {
        $headers = '';

        if ($status) {
            $headers = "HTTP/{$this->version} {$this->code} {$this->reasonPhrase}{$eol}";
        }

        foreach ($this->headers as $name => $value) {
            $headers .= "{$name}: {$value}{$eol}";
        }

        return $headers;
    }
public function getHeadersAsString($status = true, $eol = "\n")
    {
        $headers = '';

        if ($status) {
            $headers = "HTTP/{$this->version} {$this->code} {$this->reasonPhrase}{$eol}";
        }

        foreach ($this->headers as $name => $value) {
            $headers .= "{$name}: {$value}{$eol}";
        }

        return $headers;
    }
public function getHeadersAsString ( $ status = true , $ eol = "\n" ) { $ headers = '' ; if ( $ status ) { $ headers = "HTTP/{$this->version} {$this->code} {$this->reasonPhrase}{$eol}" ; } foreach ( $ this -> headers as $ name => $ value ) { $ headers .= "{$name}: {$value}{$eol}" ; } return $ headers ; }
Get the response headers as a string.

@param (bool) $status
(string) $eol

@since 3.0.0

@return string
Get the response headers as a string .