You may build the response
, instead of using the redirect(url)
method of bottle
from bottle import route, run, response
@post('/wrong')
def wrong():
response.status = 303
response.set_header('Location', '/hello')
return '"key":"val"' # Enter the body here
@route('/hello')
def hello():
return "Hello World!"
run(host='0.0.0.0', port=8080, debug=True)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…