WriteStringC write (httpCode, string, text/plain) to response
(code int, contents ...interface{})
| 581 | |
| 582 | // WriteStringC write (httpCode, string, text/plain) to response |
| 583 | func (ctx *HttpContext) WriteStringC(code int, contents ...interface{}) error { |
| 584 | content := fmt.Sprint(contents...) |
| 585 | return ctx.WriteBlobC(code, MIMETextPlainCharsetUTF8, []byte(content)) |
| 586 | } |
| 587 | |
| 588 | // WriteString write (200, string, text/html) to response |
| 589 | func (ctx *HttpContext) WriteHtml(contents ...interface{}) error { |