mirror of
https://github.com/kubernetes/client-go.git
synced 2025-07-03 18:26:59 +00:00
Merge pull request #50639 from simo5/setheader
Automatic merge from submit-queue (batch tested with PRs 50023, 50639) Extend SetHeader Requests method ito accept multiple values This allows to set headers that are multivalued directly. The headers variable is not directly accessible and currently SetHeaders allows to set only one value. ```release-note NONE ``` Kubernetes-commit: 039f898c07a643d6ef244fcb65daff5a53de41c8
This commit is contained in:
commit
b1046943dc
96
Godeps/Godeps.json
generated
96
Godeps/Godeps.json
generated
@ -448,195 +448,195 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/equality",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/errors",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/meta",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
"ImportPath": "k8s.io/apimachinery/pkg/api/resource",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
"ImportPath": "k8s.io/apimachinery/pkg/apimachinery/registered",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
|
"ImportPath": "k8s.io/apimachinery/pkg/apis/meta/v1alpha1",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/queryparams",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured",
|
"ImportPath": "k8s.io/apimachinery/pkg/conversion/unstructured",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
"ImportPath": "k8s.io/apimachinery/pkg/fields",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
"ImportPath": "k8s.io/apimachinery/pkg/labels",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/schema",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/json",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/protobuf",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/recognizer",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/streaming",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
"ImportPath": "k8s.io/apimachinery/pkg/runtime/serializer/versioning",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
"ImportPath": "k8s.io/apimachinery/pkg/selection",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
"ImportPath": "k8s.io/apimachinery/pkg/types",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/cache",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/clock",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/diff",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/errors",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/framer",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/httpstream/spdy",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/intstr",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/json",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/mergepatch",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/net",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/remotecommand",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/runtime",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/sets",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/strategicpatch",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/validation/field",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/wait",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
"ImportPath": "k8s.io/apimachinery/pkg/util/yaml",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
"ImportPath": "k8s.io/apimachinery/pkg/version",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
"ImportPath": "k8s.io/apimachinery/pkg/watch",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/json",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/netutil",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
"ImportPath": "k8s.io/apimachinery/third_party/forked/golang/reflect",
|
||||||
"Rev": "ce3cdfeed84dbf2c73db8ae4aaefd0548749e623"
|
"Rev": "3a1539060031fbcbf14733578685f59f6bda16d8"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
"ImportPath": "k8s.io/kube-openapi/pkg/common",
|
||||||
|
@ -322,11 +322,14 @@ func (r *Request) setParam(paramName, value string) *Request {
|
|||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *Request) SetHeader(key, value string) *Request {
|
func (r *Request) SetHeader(key string, values ...string) *Request {
|
||||||
if r.headers == nil {
|
if r.headers == nil {
|
||||||
r.headers = http.Header{}
|
r.headers = http.Header{}
|
||||||
}
|
}
|
||||||
r.headers.Set(key, value)
|
r.headers.Del(key)
|
||||||
|
for _, value := range values {
|
||||||
|
r.headers.Add(key, value)
|
||||||
|
}
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user