I'm trying to do this:
@get("/admin/questions/:question_id")
def question (question_id):
pass
#Some code for returning the question
@put("/admin/questions/:question_id")
pass
#I intend to write some code to update the question here.
Is this possible? GET and POST do work, PUT is apparently not working.
Yes, you can do this. See the documentation:
Example:
from bottle import put, run
@put("/foo")
def foo():
return "Foo"
run()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With