MCPcopy Create free account
hub / github.com/rclone/rclone / OpenOptionAddHTTPHeaders

Function OpenOptionAddHTTPHeaders

fs/open_options.go:335–342  ·  view source on GitHub ↗

OpenOptionAddHTTPHeaders Sets each header found in options to the http.Header map provided the key was non empty.

(headers http.Header, options []OpenOption)

Source from the content-addressed store, hash-verified

333// OpenOptionAddHTTPHeaders Sets each header found in options to the
334// http.Header map provided the key was non empty.
335func OpenOptionAddHTTPHeaders(headers http.Header, options []OpenOption) {
336 for _, option := range options {
337 key, value := option.Header()
338 if key != "" && value != "" {
339 headers.Set(key, value)
340 }
341 }
342}

Callers 6

OpenMethod · 0.92
OpenMethod · 0.92
httpResponseMethod · 0.92
createUploadMethod · 0.92
httpResponseMethod · 0.92

Calls 2

HeaderMethod · 0.65
SetMethod · 0.65

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…