mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Set headers in Watch() and Stream() requests
This commit is contained in:
parent
ac5d2cec44
commit
1ea0d46bb3
@ -648,6 +648,7 @@ func (r *Request) Watch() (watch.Interface, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = r.headers
|
||||
client := r.client
|
||||
if client == nil {
|
||||
client = http.DefaultClient
|
||||
@ -715,6 +716,7 @@ func (r *Request) Stream() (io.ReadCloser, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
req.Header = r.headers
|
||||
client := r.client
|
||||
if client == nil {
|
||||
client = http.DefaultClient
|
||||
|
Loading…
Reference in New Issue
Block a user