Skip to content

Add method-filter to routes, for separate use.#84

Open
seelpro wants to merge 1 commit intopfalcon:masterfrom
seelpro:master
Open

Add method-filter to routes, for separate use.#84
seelpro wants to merge 1 commit intopfalcon:masterfrom
seelpro:master

Conversation

@seelpro
Copy link

@seelpro seelpro commented Jan 23, 2024

Small update to separate functions for different methods.

Use like:
@app.route('/', methods=['GET'])
def get_func():
pass

@app.route('/', methods=['POST'])
def post_func():
pass

Or (need check):
ROUTES = [
# URI string matches...
("/", index),
('/init',putInit, {"methods": ['PUT']})
}

@app.route('/', methods=['GET'])
def get_func():
     pass

@app.route('/', methods=['POST'])
def post_func():
     pass
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

Successfully merging this pull request may close these issues.

1 participant