public function render($with_headers = false)
    {
        $contents = array();

        // headers
        $headers = $this->getHeaders();
        if ($with_headers && $headers) {
            foreach ($headers as $key => $value) {
                $key = join('-', array_map('ucfirst', explode('-', $key)));
                $contents[] = sprintf('%s: %s', $key, $value);
            }
            $contents[] = '';
        }

        // content
        $contents[] = $this->content;

        return join("\n", $contents);
    }