MCPcopy
hub / github.com/go-kit/kit / WriteHeader

Method WriteHeader

transport/http/jsonrpc/server.go:230–233  ·  view source on GitHub ↗

WriteHeader may not be explicitly called, so care must be taken to initialize w.code to its default value of http.StatusOK.

(code int)

Source from the content-addressed store, hash-verified

228// WriteHeader may not be explicitly called, so care must be taken to
229// initialize w.code to its default value of http.StatusOK.
230func (w *interceptingWriter) WriteHeader(code int) {
231 w.code = code
232 w.ResponseWriter.WriteHeader(code)
233}

Callers 15

EncodeJSONResponseFunction · 0.45
DefaultErrorEncoderFunction · 0.45
TestServerErrorEncoderFunction · 0.45
TestMultipleServerBeforeFunction · 0.45
TestMultipleServerAfterFunction · 0.45
TestServerFinalizerFunction · 0.45
TestHTTPClientFunction · 0.45
EncodeProtoResponseFunction · 0.45
ServeHTTPMethod · 0.45
DefaultErrorEncoderFunction · 0.45
TestServerErrorEncoderFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestServerErrorEncoderFunction · 0.36
TestMultipleServerBeforeFunction · 0.36
TestMultipleServerAfterFunction · 0.36
TestServerFinalizerFunction · 0.36
TestHTTPClientFunction · 0.36
TestServerErrorEncoderFunction · 0.36
httptestServerFunction · 0.36
TestClientHappyPathFunction · 0.36
TestCanUseDefaultsFunction · 0.36