MCPcopy Index your code
hub / github.com/bytebase/bytebase / newCustomHeaderTransport

Function newCustomHeaderTransport

action/command/api.go:133–141  ·  view source on GitHub ↗
(base http.RoundTripper, headers http.Header)

Source from the content-addressed store, hash-verified

131}
132
133func newCustomHeaderTransport(base http.RoundTripper, headers http.Header) http.RoundTripper {
134 if base == nil {
135 base = http.DefaultTransport
136 }
137 return &customHeaderTransport{
138 base: base,
139 headers: headers.Clone(),
140 }
141}
142
143func (t *customHeaderTransport) RoundTrip(req *http.Request) (*http.Response, error) {
144 req = req.Clone(req.Context())

Calls

no outgoing calls