public function getHeaders(string $name = null)
    {
        if (is_null($name)) {
            return $this->get('headers');
        }

        return $this->get('headers', $name);
    }
public function getHeaders(string $name = null)
    {
        if (is_null($name)) {
            return $this->get('headers');
        }

        return $this->get('headers', $name);
    }
public function getHeaders ( string $ name = null ) { if ( is_null ( $ name ) ) { return $ this -> get ( 'headers' ) ; } return $ this -> get ( 'headers' , $ name ) ; }
Returns either the header value given
the name or the all headers

@param *string $name  Name of the header

@return mixed
Returns either the header value given the name or the all headers