mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* Logs should support specifying region when using S3-compatible object store * Use aws-sdk-go client for s3 backed logstore * fixes vendor with aws-sdk-go dependencies
25 lines
626 B
Go
25 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
|
|
}
|