public function printLastResponseHeaders() { $text = ''; $headers = $this->request->getHttpHeaders(); foreach ($headers as $name => $value) { $text .= $name . ': ' . $this->request->getHttpHeader($name) . "\n"; } echo $text; }