public function setContent($content, $code = 200)
    {
        $this->content = $content ? $content : '';
        $this->statusCode = $code;
        if (!is_scalar($content)) {
            $this->toJson();
        }

        return $this;
    }