MCPcopy
hub / github.com/minio/minio-go / Header

Method Header

api-get-options.go:67–84  ·  view source on GitHub ↗

Header returns the http.Header representation of the GET options.

()

Source from the content-addressed store, hash-verified

65
66// Header returns the http.Header representation of the GET options.
67func (o GetObjectOptions) Header() http.Header {
68 headers := make(http.Header, len(o.headers))
69 for k, v := range o.headers {
70 headers.Set(k, v)
71 }
72 if o.ServerSideEncryption != nil && o.ServerSideEncryption.Type() == encrypt.SSEC {
73 o.ServerSideEncryption.Marshal(headers)
74 }
75 // this header is set for active-active replication scenario where GET/HEAD
76 // to site A is proxy'd to site B if object/version missing on site A.
77 if o.Internal.ReplicationProxyRequest != "" {
78 headers.Set(minIOBucketReplicationProxyRequest, o.Internal.ReplicationProxyRequest)
79 }
80 if o.Checksum {
81 headers.Set("x-amz-checksum-mode", "ENABLED")
82 }
83 return headers
84}
85
86// Set adds a key value pair to the options. The
87// key-value pair will be part of the HTTP GET request

Callers

nothing calls this directly

Calls 3

TypeMethod · 0.65
MarshalMethod · 0.65
SetMethod · 0.45

Tested by

no test coverage detected