String writes a plain string response.
(status int, data string)
| 163 | |
| 164 | // String writes a plain string response. |
| 165 | func (e *Event) String(status int, data string) error { |
| 166 | e.setResponseHeaderIfEmpty(headerContentType, "text/plain; charset=utf-8") |
| 167 | e.Response.WriteHeader(status) |
| 168 | _, err := e.Response.Write([]byte(data)) |
| 169 | return err |
| 170 | } |
| 171 | |
| 172 | // HTML writes an HTML response. |
| 173 | func (e *Event) HTML(status int, data string) error { |