AWS.ApiGatewayManagementApi, URL and headers with stage
Closed this issue · 1 comments
fergusg commented
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 commented
@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 👍