MCPcopy Index your code
hub / github.com/cortexproject/cortex / WriteHTMLResponse

Function WriteHTMLResponse

pkg/util/http.go:93–98  ·  view source on GitHub ↗

Sends message as text/html response with 200 status code.

(w http.ResponseWriter, message string)

Source from the content-addressed store, hash-verified

91
92// Sends message as text/html response with 200 status code.
93func 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

Callers 2

ServeHTTPMethod · 0.92
ServeHTTPMethod · 0.92

Calls 3

SetMethod · 0.65
HeaderMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected