Revert "Stream support for k8s client request"

This reverts commit 755b598a7d.
This commit is contained in:
Clayton Coleman
2014-10-01 19:39:08 -04:00
parent 67ef24b410
commit a81dc44fc6
2 changed files with 0 additions and 54 deletions

View File

@@ -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 {