diff options
author | Niall Sheridan <nsheridan@gmail.com> | 2016-08-27 01:32:30 +0100 |
---|---|---|
committer | Niall Sheridan <nsheridan@gmail.com> | 2016-08-27 01:32:30 +0100 |
commit | 921818bca208f0c70e85ec670074cb3905cbbc82 (patch) | |
tree | 4aa67ad2bb2083bd486db3f99680d6d08a2c36b3 /vendor/google.golang.org/api/gensupport/resumable.go | |
parent | 7f1c9358805302344a89c1fed4eab1342931b061 (diff) |
Update dependencies
Diffstat (limited to 'vendor/google.golang.org/api/gensupport/resumable.go')
-rw-r--r-- | vendor/google.golang.org/api/gensupport/resumable.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/google.golang.org/api/gensupport/resumable.go b/vendor/google.golang.org/api/gensupport/resumable.go index ad16943..695e365 100644 --- a/vendor/google.golang.org/api/gensupport/resumable.go +++ b/vendor/google.golang.org/api/gensupport/resumable.go @@ -12,7 +12,6 @@ import ( "time" "golang.org/x/net/context" - "golang.org/x/net/context/ctxhttp" ) const ( @@ -80,7 +79,7 @@ func (rx *ResumableUpload) doUploadRequest(ctx context.Context, data io.Reader, req.Header.Set("Content-Range", contentRange) req.Header.Set("Content-Type", rx.MediaType) req.Header.Set("User-Agent", rx.UserAgent) - return ctxhttp.Do(ctx, rx.Client, req) + return SendRequest(ctx, rx.Client, req) } @@ -135,6 +134,8 @@ func contextDone(ctx context.Context) bool { // It retries using the provided back off strategy until cancelled or the // strategy indicates to stop retrying. // It is called from the auto-generated API code and is not visible to the user. +// Before sending an HTTP request, Upload calls any registered hook functions, +// and calls the returned functions after the request returns (see send.go). // rx is private to the auto-generated API code. // Exactly one of resp or err will be nil. If resp is non-nil, the caller must call resp.Body.Close. func (rx *ResumableUpload) Upload(ctx context.Context) (resp *http.Response, err error) { |