web - Bottle server to accept question mark as input in Python -


i writing following code:

bottle import route, run @route('/input/') def greet(name): return name

run(host='localhost', port=8080, debug=true)

however, when try access this: http://localhost:8080/input/?hi

i following error: sorry, requested url 'http://localhost:8080/input/?hi' caused error: not found: '/input/'

i need parse whole string "?hi" input string in method "inpout"

i have tried replicate issue, have not had success. version of bottle using?

below altered version of code have print "hello (name)" variable.

from bottle import route, run, request  @route('/input/') def greet():     return "hello " + request.query.get("name")   run(host='localhost', port=8080, debug=true) 

hitting http://localhost:8080/input/?name=shaklasah result in hello shaklasah


Comments

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -