diff --git a/library/Icinga/Web/Response.php b/library/Icinga/Web/Response.php index af3e1e27e..71536c239 100644 --- a/library/Icinga/Web/Response.php +++ b/library/Icinga/Web/Response.php @@ -54,6 +54,13 @@ class Response extends Zend_Controller_Response_Http */ protected $rerenderLayout = false; + /** + * Content type of this response + * + * @var string + */ + protected $contentType = 'text/html'; + /** * Get the auto-refresh interval * @@ -205,6 +212,30 @@ class Response extends Zend_Controller_Response_Http return $this; } + /** + * Set the content type of this response + * + * @param string $contentType + * + * @return $this + */ + public function setContentType($contentType) + { + $this->contentType = $contentType; + return $this; + } + + /** + * Get the content type of this response + * + * @return string + */ + public function getContentType() + { + return $this->contentType; + } + + /** * Entry point for HTTP responses in JSON format *