MCPcopy Create free account
hub / github.com/AbelChe/evil_minio / encodeResponseJSON

Function encodeResponseJSON

cmd/api-headers.go:96–101  ·  view source on GitHub ↗

Encodes the response headers into JSON format.

(response interface{})

Source from the content-addressed store, hash-verified

94
95// Encodes the response headers into JSON format.
96func encodeResponseJSON(response interface{}) []byte {
97 var bytesBuffer bytes.Buffer
98 e := json.NewEncoder(&bytesBuffer)
99 e.Encode(response)
100 return bytesBuffer.Bytes()
101}
102
103// Write parts count
104func setPartsCountHeaders(w http.ResponseWriter, objInfo ObjectInfo) {

Callers 3

writeErrorResponseJSONFunction · 0.85
HealHandlerMethod · 0.85

Calls 2

EncodeMethod · 0.80
BytesMethod · 0.80

Tested by

no test coverage detected