-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Default behaviour when the path parameters is not provided #20
Comments
Hi @simongarner. Thanks for engaging in the development. As i understand it you are talking about two things:
Lets start with 1 and then colab on design of 2
|
Hey @sloev, I'm gonna hit you with a PR later today! Just to be clear, you'll still be able to specify Simon |
Hi Simon thanks for the pr. Ive got a request for deleting a print statement and then we can merge. Lets open issue 2 in a seperate issue and close this one on merge |
merged |
First of all, I want to thank you guys for this piece of code. I was looking for something to bind functions to HTTP methods when using AWS lambdas and was about to write it myself, but
lambdarest
came to the rescue.However, I'm experiencing issues with how the binding behaves when you don't provide the
path
parameters. The way I see it, the behavior should be to match any path, not"/"
. This would allow matching on event with path parameters(eg:"/your/object/{id}"
). Correct me if I'm wrong, but currently, it is impossible to match path with path parameters, because the path will be different on each event.To support my use case, I wrote a decorator to hijack the event and set its
path
to"/"
before calling thehandler
on it.I already have an idea of how to implement this, I could submit a pull request if you think that this behavior is a good idea.
Just some thought, keep up the great work!
The text was updated successfully, but these errors were encountered: