1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

picoev: add html() content-type method

This commit is contained in:
nyaascii 2020-06-29 20:25:16 +02:00 committed by GitHub
parent 77e56aa3f9
commit 3436ae99fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")