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

Function WriteTextResponse

pkg/util/http.go:85–90  ·  view source on GitHub ↗

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

(w http.ResponseWriter, message string)

Source from the content-addressed store, hash-verified

83
84// Sends message as text/plain response with 200 status code.
85func 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.
93func WriteHTMLResponse(w http.ResponseWriter, message string) {

Callers 3

readyHandlerMethod · 0.92
runtimeConfigHandlerFunction · 0.92
TestWriteTextResponseFunction · 0.92

Calls 3

SetMethod · 0.65
HeaderMethod · 0.45
WriteMethod · 0.45

Tested by 1

TestWriteTextResponseFunction · 0.74