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

Adding request context to request? #522

Closed
sgasse opened this issue Sep 5, 2022 · 2 comments
Closed

Adding request context to request? #522

sgasse opened this issue Sep 5, 2022 · 2 comments

Comments

@sgasse
Copy link
Contributor

sgasse commented Sep 5, 2022

We have a lambda function running behind an API Gateway with a custom authorizer. The authorizer adds information to the RequestContext that is relevant for our lambda function. To facilitate testing this function, it would be great to add a RequestContext with the same ease as adding query string parameters.

I looked at the code for with_query_string_parameters and followed the same approach. I will push a PR with the code in case it is useful for others.

calavera pushed a commit that referenced this issue Sep 5, 2022
The trait `RequestExt` already includes functions to add query string
parameters, path parameters and stage variables to a request. This
commit adds another function to allow adding a `RequestContext` to the
request. This is useful in cases where a lambda function is called by
the API Gateway with a custom authorizer that adds parameters to the
`RequestContext`.

Related to #522

Co-authored-by: Simon Gasse <sgasse@users.noreply.github.com>
@calavera
Copy link
Contributor

Fixed by #523

@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for the maintainers of this repository to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

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