MCPcopy Create free account
hub / github.com/imgproxy/imgproxy / WriteHeader

Method WriteHeader

server/responsewriter/writer.go:136–140  ·  view source on GitHub ↗

WriteHeader writes the HTTP response header. It ensures that all headers are flushed before writing the status code.

(statusCode int)

Source from the content-addressed store, hash-verified

134//
135// It ensures that all headers are flushed before writing the status code.
136func (w *Writer) WriteHeader(statusCode int) {
137 w.beforeWrite(statusCode)
138
139 w.httpResponseWriter.WriteHeader(statusCode)
140}
141
142// Write writes the HTTP response body.
143//

Callers 15

TestHeaderCasesMethod · 0.95
handlerMethod · 0.80
startMethod · 0.80
ExecuteMethod · 0.80
executeMethod · 0.80
ExecuteMethod · 0.80
respondWithImageMethod · 0.80
NotFoundHandlerMethod · 0.80
OkHandlerMethod · 0.80
TestIntoSuccessMethod · 0.80
WithReportErrorMethod · 0.80

Calls 1

beforeWriteMethod · 0.95

Tested by 15

TestHeaderCasesMethod · 0.76
handlerMethod · 0.64
TestIntoSuccessMethod · 0.64
TestHTTPMethodsMethod · 0.64
TestMiddlewareOrderMethod · 0.64
TestServeHTTPMethod · 0.64
TestRequestIDMethod · 0.64
TestReplaceIPMethod · 0.64