String sends a string response with status code.
(code int, s string)
| 522 | |
| 523 | // String sends a string response with status code. |
| 524 | func (c *Context) String(code int, s string) (err error) { |
| 525 | return c.Blob(code, MIMETextPlainCharsetUTF8, stringToBytes(s)) |
| 526 | } |
| 527 | |
| 528 | func (c *Context) jsonPBlob(code int, callback string, i any) (err error) { |
| 529 | c.writeContentType(MIMEApplicationJavaScriptCharsetUTF8) |