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

Function NewObjectOK

storage/reader.go:36–43  ·  view source on GitHub ↗

NewObjectOK creates a new Reader with a 200 OK status.

(headers http.Header, body io.ReadCloser)

Source from the content-addressed store, hash-verified

34
35// NewObjectOK creates a new Reader with a 200 OK status.
36func NewObjectOK(headers http.Header, body io.ReadCloser) *ObjectReader {
37 return &ObjectReader{
38 Status: http.StatusOK,
39 Headers: headers,
40 Body: body,
41 contentLength: -1, // is set in Response()
42 }
43}
44
45// NewObjectPartialContent creates a new Reader with a 206 Partial Content status.
46func NewObjectPartialContent(headers http.Header, body io.ReadCloser) *ObjectReader {

Callers 6

GetObjectMethod · 0.92
GetObjectMethod · 0.92
GetObjectMethod · 0.92
GetObjectMethod · 0.92
GetObjectMethod · 0.92

Calls

no outgoing calls

Tested by 1