Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support array member names #197

Open
mpraski opened this issue Jun 16, 2024 · 1 comment
Open

Support array member names #197

mpraski opened this issue Jun 16, 2024 · 1 comment

Comments

@mpraski
Copy link

mpraski commented Jun 16, 2024

First of all thank you for this wonderful library!

I've been using it to communicate with the SES API, specifically the get_identity_verification_attributes call, and it seems that current body encoder is not handling certain requests in accordance with the spec.

The call:

AWS.SES.get_identity_verification_attributes(client, %{"Identities" => ["example.com"]})

generates following request body:

Action=GetIdentityVerificationAttributes&Identities.1=example.com&Version=2010-12-01

This results in a HTTP 400 from AWS, which happens due to the array member naming convention of having the "member" in between the array name and the index:Identities.member.1=example.com rather than Identities.1=example.com. (See https://docs.aws.amazon.com/ses/latest/APIReference/API_GetIdentityVerificationAttributes.html)

AWS CDK for e.g. Golang factors in the member name in the array format (https://github.com/aws/aws-sdk-go-v2/blob/main/aws/protocol/query/array.go#L36), and I assume the AWS.Util.encode_query_value/1 would need to be made configurable to some extent to allow those member names globally/per API.

I'll do more research on this convention and gladly raise a PR to address this issue - suggestions are welcome.

@mpraski mpraski changed the title Array member name Support array member names Jun 16, 2024
@namjae
Copy link

namjae commented Nov 1, 2024

#199 will add member keyword and i was able to solve my problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants