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

Method setUserAgent

api.go:1032–1037  ·  view source on GitHub ↗

set User agent.

(req *http.Request)

Source from the content-addressed store, hash-verified

1030
1031// set User agent.
1032func (c *Client) setUserAgent(req *http.Request) {
1033 req.Header.Set("User-Agent", libraryUserAgent)
1034 if c.appInfo.appName != "" && c.appInfo.appVersion != "" {
1035 req.Header.Set("User-Agent", libraryUserAgent+" "+c.appInfo.appName+"/"+c.appInfo.appVersion)
1036 }
1037}
1038
1039// makeTargetURL make a new target url.
1040func (c *Client) makeTargetURL(bucketName, objectName, bucketLocation string, isVirtualHostStyle bool, queryValues url.Values) (*url.URL, error) {

Callers 4

createSessionRequestMethod · 0.95
newRequestMethod · 0.95

Calls 1

SetMethod · 0.45

Tested by 1