Skip to content

Commit

Permalink
example/service/s3/presignUR: Example error message should be 'PUT' n…
Browse files Browse the repository at this point in the history
…ot GET' (aws#2887)

Updates client's example to use `PUT` in error message instead of `GET`.
  • Loading branch information
matheuscscp authored and jasdel committed Oct 22, 2019
1 parent 9e41253 commit b2e7659
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions example/service/s3/presignURL/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ func uploadFile(serverURL, key, filename string) error {
// to be used with the size of content requested.
req, err := getPresignedRequest(serverURL, "PUT", key, size)
if err != nil {
return fmt.Errorf("failed to get get presigned request, %v", err)
return fmt.Errorf("failed to get put presigned request, %v", err)
}
req.Body = r

// Upload the file contents to S3.
resp, err := http.DefaultClient.Do(req)
if err != nil {
return fmt.Errorf("failed to do GET request, %v", err)
return fmt.Errorf("failed to do PUT request, %v", err)
}

defer resp.Body.Close()
Expand Down

0 comments on commit b2e7659

Please sign in to comment.