1
0
Fork 0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-11-13 00:12:43 +00:00
cloudkeys-go/vendor/github.com/aws/aws-sdk-go/service/polly/customizations.go
Knut Ahlers 7581358922
Switch to dep for vendoring, update dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2017-12-08 13:03:10 +01:00

24 lines
626 B
Go

package polly
import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/private/protocol/rest"
)
func init() {
initRequest = func(r *request.Request) {
if r.Operation.Name == opSynthesizeSpeech {
r.Operation.BeforePresignFn = restGETPresignStrategy
}
}
}
// restGETPresignStrategy will prepare the request from a POST to a GET request.
// Enabling the presigner to sign the request as a GET.
func restGETPresignStrategy(r *request.Request) error {
r.Handlers.Build.Clear()
r.Handlers.Build.PushBack(rest.BuildAsGET)
r.Operation.HTTPMethod = "GET"
r.HTTPRequest.Method = "GET"
return nil
}