-
Notifications
You must be signed in to change notification settings - Fork 347
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
Comments
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>
Fixed by #523 |
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 aRequestContext
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.The text was updated successfully, but these errors were encountered: