Sends message as text/plain response with 200 status code.
(w http.ResponseWriter, message string)
| 83 | |
| 84 | // Sends message as text/plain response with 200 status code. |
| 85 | func WriteTextResponse(w http.ResponseWriter, message string) { |
| 86 | w.Header().Set("Content-Type", "text/plain") |
| 87 | |
| 88 | // Ignore inactionable errors. |
| 89 | _, _ = w.Write([]byte(message)) |
| 90 | } |
| 91 | |
| 92 | // Sends message as text/html response with 200 status code. |
| 93 | func WriteHTMLResponse(w http.ResponseWriter, message string) { |