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

Can't get querystring parameters on connect #2055

Open
moisesmarques opened this issue Jul 16, 2023 · 0 comments
Open

Can't get querystring parameters on connect #2055

moisesmarques opened this issue Jul 16, 2023 · 0 comments

Comments

@moisesmarques
Copy link

moisesmarques commented Jul 16, 2023

Hey guys,

Would be incredible to have querystring parameters in the event.

class WebsocketEvent(BaseLambdaEvent):
    def __init__(self, event_dict: Dict[str, Any], context: Any):
        super(WebsocketEvent, self).__init__(event_dict, context)
        self._json_body: Optional[Dict[str, Any]] = None

    def _extract_attributes(self, event_dict: Dict[str, Any]) -> None:
        request_context = event_dict['requestContext']
        self.domain_name: str = request_context['domainName']
        self.stage: str = request_context['stage']
        self.connection_id: str = request_context['connectionId']
        self.body: str = str(event_dict.get('body'))
        self.query_params: str = str(event_dict.get('queryStringParameters')) # <------------- I'm using like that.

...

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

1 participant