diff --git a/HttpServer/Http/Response.php b/HttpServer/Http/Response.php index 1d2d14dc..6ad2a412 100644 --- a/HttpServer/Http/Response.php +++ b/HttpServer/Http/Response.php @@ -84,6 +84,40 @@ class Response extends Application } } + + /** + * @param $content + * @return mixed + */ + public function toHtml($content) + { + $this->format = self::HTML; + return $content; + } + + + /** + * @param $content + * @return mixed + */ + public function toJson($content) + { + $this->format = self::JSON; + return $content; + } + + + /** + * @param $content + * @return mixed + */ + public function toXml($content) + { + $this->format = self::XML; + return $content; + } + + /** * @return mixed * @throws Exception