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

AWS.ApiGatewayManagementApi, URL and headers with stage #152

Closed
fergusg opened this issue Nov 27, 2022 · 1 comment · Fixed by aws-beam/aws-codegen#110
Closed

AWS.ApiGatewayManagementApi, URL and headers with stage #152

fergusg opened this issue Nov 27, 2022 · 1 comment · Fixed by aws-beam/aws-codegen#110

Comments

@fergusg
Copy link

fergusg commented Nov 27, 2022

I am using ApiGatewayManagementApi.post_to_connection setting the endpoint to {api-id}.execute-api.{region}.amazonaws.com/{stage}

However the API is sending

URL : https://{api-id}.execute-api.{region}.amazonaws.com/@connections/{ConnectionId}  (missing /{stage})
Host (header): {api-id}.execute-api.{region}.amazonaws.com/{stage} (extra /{stage})

instead of what I expect:

URL : https://{api-id}.execute-api.{region}.amazonaws.com/{stage}/@connections/{ConnectionId}
Host (header): {api-id}.execute-api.{region}.amazonaws.com

I am very new to both Elixir and this API. I was able to hack post_to_connection to hard code the /{stage} (and omit from the endpoint) and verified that the API works otherwise as expected.

Regards,

P.S. v0.31.1

@onno-vos-dev
Copy link
Member

@fergusg Somehow this issue got lost. I've taken a look at this after the migration to V2 and it seems this would still be an issue. Unfortunately nothing in the spec indicates that a stage is a necessary parameter anywhere 😢

I've created a PR that I'll merge after: aws-beam/aws-codegen#109 which will address this issue 👍

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

Successfully merging a pull request may close this issue.

2 participants