crowdmob/goamz — pull request #171 by bmatsuo (2014-07-07 22:02:03+00:00)
Title: S3: raw request methods

This adds a few exported methods to the API.

```
func (b *Bucket) GetRequest(path string) (*http.Request, error)
func (b *Bucket) GetRequestWithHeaders(path string, headers map[string][]string) (*http.Request, error)
func (b *Bucket) PutRequest(path string, length int64, contType string, perm ACL, options Options) (*http.Request, error)
```

The PutRequest does not take an io.Reader, only a length. The the body is added after the fact.

I shuffled around a few internals to make things simpler and dry-ish.

Fixes #108 -- the `*http.Client` object is cached between requests (unless timeouts change).
Closes #127 -- allowing compression to be controlled by using an external `*http.Client`
Closes #169 -- allowing cancellation of transfers again by using an external `*http.Client`