aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2019-07-07 21:33:44 +0100
committerNiall Sheridan <nsheridan@gmail.com>2019-07-07 21:33:44 +0100
commit8c12c6939aab9106db14ec2d11d983bc5b29fb2c (patch)
treef9dc8a7d167c6355e47a65c52d4eb7b9ea03e6c8 /vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
parent0bd454cc448b812da6c693b451d86ff4cadbb6b2 (diff)
Switch to modules
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go')
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go39
1 files changed, 0 insertions, 39 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go b/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
deleted file mode 100644
index e36e468..0000000
--- a/vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
+++ /dev/null
@@ -1,39 +0,0 @@
-// +build !go1.8
-
-package request
-
-import "io"
-
-// NoBody is an io.ReadCloser with no bytes. Read always returns EOF
-// and Close always returns nil. It can be used in an outgoing client
-// request to explicitly signal that a request has zero bytes.
-// An alternative, however, is to simply set Request.Body to nil.
-//
-// Copy of Go 1.8 NoBody type from net/http/http.go
-type noBody struct{}
-
-func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
-func (noBody) Close() error { return nil }
-func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
-
-// NoBody is an empty reader that will trigger the Go HTTP client to not include
-// and body in the HTTP request.
-var NoBody = noBody{}
-
-// ResetBody rewinds the request body back to its starting position, and
-// sets the HTTP Request body reference. When the body is read prior
-// to being sent in the HTTP request it will need to be rewound.
-//
-// ResetBody will automatically be called by the SDK's build handler, but if
-// the request is being used directly ResetBody must be called before the request
-// is Sent. SetStringBody, SetBufferBody, and SetReaderBody will automatically
-// call ResetBody.
-func (r *Request) ResetBody() {
- body, err := r.getNextRequestBody()
- if err != nil {
- r.Error = err
- return
- }
-
- r.HTTPRequest.Body = body
-}