github.com/aavshr/aws-sdk-go@v1.41.3/service/polly/customizations.go (about) 1 package polly 2 3 import ( 4 "github.com/aavshr/aws-sdk-go/aws/request" 5 "github.com/aavshr/aws-sdk-go/private/protocol/rest" 6 ) 7 8 func init() { 9 initRequest = func(r *request.Request) { 10 if r.Operation.Name == opSynthesizeSpeech { 11 r.Operation.BeforePresignFn = restGETPresignStrategy 12 } 13 } 14 } 15 16 // restGETPresignStrategy will prepare the request from a POST to a GET request. 17 // Enabling the presigner to sign the request as a GET. 18 func restGETPresignStrategy(r *request.Request) error { 19 r.Handlers.Build.Clear() 20 r.Handlers.Build.PushBack(rest.BuildAsGET) 21 r.Operation.HTTPMethod = "GET" 22 r.HTTPRequest.Method = "GET" 23 return nil 24 }