]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blob - vendor/github.com/aws/aws-sdk-go/aws/request/request_1_7.go
Initial transfer of provider code
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / aws / aws-sdk-go / aws / request / request_1_7.go
1 // +build !go1.8
2
3 package request
4
5 import "io"
6
7 // NoBody is an io.ReadCloser with no bytes. Read always returns EOF
8 // and Close always returns nil. It can be used in an outgoing client
9 // request to explicitly signal that a request has zero bytes.
10 // An alternative, however, is to simply set Request.Body to nil.
11 //
12 // Copy of Go 1.8 NoBody type from net/http/http.go
13 type noBody struct{}
14
15 func (noBody) Read([]byte) (int, error) { return 0, io.EOF }
16 func (noBody) Close() error { return nil }
17 func (noBody) WriteTo(io.Writer) (int64, error) { return 0, nil }
18
19 // Is an empty reader that will trigger the Go HTTP client to not include
20 // and body in the HTTP request.
21 var noBodyReader = noBody{}