From 3436ae99fcf7df75d2515bd207609718bcc73f6e Mon Sep 17 00:00:00 2001 From: nyaascii Date: Mon, 29 Jun 2020 20:25:16 +0200 Subject: [PATCH] picoev: add html() content-type method --- vlib/picohttpparser/response.v | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vlib/picohttpparser/response.v b/vlib/picohttpparser/response.v index bf4642bc3b..b8819dc74a 100644 --- a/vlib/picohttpparser/response.v +++ b/vlib/picohttpparser/response.v @@ -46,6 +46,12 @@ pub fn (mut r Response) content_type(s string) &Response { return r } +[inline] +pub fn (mut r Response) html() &Response { + r.buf += cpy_str(r.buf, "Content-Type: text/html\r\n") + return r +} + [inline] pub fn (mut r Response) plain() &Response { r.buf += cpy_str(r.buf, "Content-Type: text/plain\r\n")