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

the add_route decorator seems to be only good for one method with same signature #130

Open
sjatkins opened this issue Oct 8, 2013 · 1 comment

Comments

@sjatkins
Copy link

sjatkins commented Oct 8, 2013

This doesn't seem to be good if so for REST type interfaces. I wanted to have
@app.add_route(r'^/run/paramenters/(\w+)', method='GET")
def my_getter(run_id): pass
and
@app.add_route(r'^/run/paramenters/(\w+)', method='POST")
def my_setter(run_id): pass

But in that order I get a 405 for the POST. What gives? I can do this with classes all day. Some bug under the add_route decorator?

@j2labs
Copy link
Owner

j2labs commented Oct 9, 2013

I think you are right that this is a bug.

I am very close to starting a refactor of Brubeck. I was working on
Schematics. I intend to move the system away from using classes and moving
to this decorator model, so I will fix this as part of that process.

On Tue, Oct 8, 2013 at 6:10 PM, sjatkins [email protected] wrote:

This doesn't seem to be good if so for REST type interfaces. I wanted to
have
@app.add_route(r'^/run/paramenters/(\w+)', method='GET")
def my_getter(run_id): pass
and
@app.add_route(r'^/run/paramenters/(\w+)', method='POST")
def my_setter(run_id): pass

But in that order I get a 405 for the POST. What gives? I can do this with
classes all day. Some bug under the add_route decorator?


Reply to this email directly or view it on GitHubhttps://github.com//issues/130
.

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