Revert "Stream support for k8s client request"
This reverts commit 755b598a7d
.
This commit is contained in:
@@ -224,26 +224,6 @@ func (r *Request) Watch() (watch.Interface, error) {
|
||||
return watch.NewStreamWatcher(watchjson.NewDecoder(response.Body, r.c.Codec)), nil
|
||||
}
|
||||
|
||||
// Stream formats and executes the request, and offers streaming of the response.
|
||||
// Returns io.ReadCloser which could be used for streaming of the response, or an error
|
||||
func (r *Request) Stream() (io.ReadCloser, error) {
|
||||
if r.err != nil {
|
||||
return nil, r.err
|
||||
}
|
||||
req, err := http.NewRequest(r.verb, r.finalURL(), nil)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if r.c.auth != nil {
|
||||
req.SetBasicAuth(r.c.auth.User, r.c.auth.Password)
|
||||
}
|
||||
response, err := r.c.httpClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return response.Body, nil
|
||||
}
|
||||
|
||||
// Do formats and executes the request. Returns the API object received, or an error.
|
||||
func (r *Request) Do() Result {
|
||||
for {
|
||||
|
Reference in New Issue
Block a user