sanic版本
# 版本,Blueprint('/',version=1) # http://127.0.0.1:8000/v1 # 在蓝图中也可添加 from sanic import Sanic from sanic.response import json app=Sanic("app") @app.post('/',version=1) async def test(request): name=request.form.get("name") return json({'name':name}) if __name__ == '__main__': app.run(host="0.0.0.0",port=8000,debug=True)
浙公网安备 33010602011771号