apex / apex-go

Golang runtime for Apex/Lambda.
MIT License
292 stars 32 forks source link

Binary Support #58

Closed simpleblack closed 7 years ago

simpleblack commented 7 years ago

Hi. go-apex binary not support? go-apex = response only (interface{}, error)

how can response binary?

I want this implemented https://aws.amazon.com/ko/blogs/compute/binary-support-for-api-integrations-with-amazon-api-gateway/

tj commented 7 years ago

Ahh the binary has to be base64 encoded, go-apex has proxy support as well which does this https://github.com/apex/go-apex/tree/master/proxy

simpleblack commented 7 years ago

I want easily use binary not used proxy. apex.HandleFunc(func() (string, error) = text apex.HandleFunc(func() (string, error) = binary(api gateway Base64Encoded true) apex.HandleFunc(func() (interface{}, error) = json

Is it impossible? Why used proxy?

Thank you.

tj commented 7 years ago

Lambda only supports JSON output, so binary has to be base64 encoded at the moment

simpleblack commented 7 years ago

Thank you