MCPcopy
hub / github.com/cortexlabs/cortex / respondPlainText

Function respondPlainText

pkg/async-gateway/endpoint.go:124–128  ·  view source on GitHub ↗
(w http.ResponseWriter, statusCode int, message string)

Source from the content-addressed store, hash-verified

122}
123
124func respondPlainText(w http.ResponseWriter, statusCode int, message string) {
125 w.Header().Set("Content-Type", "text/plain")
126 w.WriteHeader(statusCode)
127 _, _ = w.Write([]byte(message))
128}
129
130func respondJSON(w http.ResponseWriter, statusCode int, s interface{}) error {
131 w.Header().Set("Content-Type", "application/json")

Callers 2

CreateWorkloadMethod · 0.85
GetWorkloadMethod · 0.85

Calls 2

SetMethod · 0.80
WriteMethod · 0.80

Tested by

no test coverage detected