MCPcopy
hub / github.com/kubernetes/client-go / SetHeader

Method SetHeader

rest/request.go:349–358  ·  view source on GitHub ↗
(key string, values ...string)

Source from the content-addressed store, hash-verified

347}
348
349func (r *Request) SetHeader(key string, values ...string) *Request {
350 if r.headers == nil {
351 r.headers = http.Header{}
352 }
353 r.headers.Del(key)
354 for _, value := range values {
355 r.headers.Add(key, value)
356 }
357 return r
358}
359
360// Timeout makes the request use the given duration as an overall timeout for the
361// request. Additionally, if set passes the value as "timeout" parameter in URL.

Callers 5

NewRequestFunction · 0.95
BodyMethod · 0.95
OpenAPISchemaMethod · 0.80
PatchMethod · 0.80
PatchMethod · 0.80

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected