Skip body encoding when payload requires a binary#62
Conversation
This is necessary to enable some operations like S3's "put object" to send the payload as a binary (a string or an binary representing a blob). This closes aws-beam/aws-elixir#41 A fix to Erlang REST template is coming soon.
This is useful for services that work around files, like S3 or MediaStoreData. They require use to send the body as it is, without encoding (they are binaries). This is related to aws-beam/aws-codegen#62 This closes #41
This is useful for services that work with files, like S3 or MediaStoreData. They require us to send the body as it is, without encoding (they are binaries). This is related to aws-beam/aws-codegen#62 Closes #41
This is useful for services that work with files, like S3 or MediaStoreData. They require us to send the body as it is, without encoding (they are binaries). This is related to aws-beam/aws-codegen#62 Closes #41
|
Is this related to issue #30? |
|
@jfacorro yes! I didn't see that issue 😬 Thanks for pointing out! |
This is useful for services that work with files, like S3 or MediaStoreData. They require us to send the body as it is, without encoding (they are binaries). This is related to aws-beam/aws-codegen#62
This is useful for services that work with files, like S3 or MediaStoreData. They require us to send the body as it is, without encoding (they are binaries). This is related to aws-beam/aws-codegen#62
|
Hi @philss I'm getting an error in the Erlang library when trying to fetch from S3, since the client is trying to decode the non-decoded body of the response. I wonder if this is an issue of the Erlang generated module or if you have the same for Elixir. Would it be safe to assume that whenever the "send-body-as-binary" flag is set, the inbound/outbound procedure is the same? |
|
And looking at the actual code, it looks like we need to the same for the output/shape, cause this PR only addresses it for input/shape. |
@robertoaloi I think there is a way to read that from the output shape. I will try to play with this. In any case, can you open a new issue reporting the problem? Thanks! |
Yes, exactly what I found (see my second comment above). Opening a PR, at least for the Erlang part of it. |
This is necessary to enable some operations like S3's "put object" to
send the payload as a binary (a string or an binary representing a
blob).
A fix to Erlang REST template is coming soon.