code: public function getHeaders($key = null)
      {
          if ($key === null) {
              return $this->headers;
          }
  
          if (isset($this->headers[$key])) {
              return $this->headers[$key];
          }
  
          return false;
      }
docs: Get response headers
  
  @param null $key
  @return array|string|false