Sends message as text/html response with 200 status code.
(w http.ResponseWriter, message string)
| 91 | |
| 92 | // Sends message as text/html response with 200 status code. |
| 93 | func WriteHTMLResponse(w http.ResponseWriter, message string) { |
| 94 | w.Header().Set("Content-Type", "text/html") |
| 95 | |
| 96 | // Ignore inactionable errors. |
| 97 | _, _ = w.Write([]byte(message)) |
| 98 | } |
| 99 | |
| 100 | // RenderHTTPResponse either responds with json or a rendered html page using the passed in template |
| 101 | // by checking the Accepts header |