# !/usr/bin/env python# -*- coding: utf-8 -*-from flask import Flask,requestfrom lib.Mojo.Client import *import chardetapp = Flask(__name__)##装饰器作用,是做一个URL与视图函数的映射@app.route('/api/SMSinfo/')def sms(): message = request.args.get('message') print message print '----------------' print type(message) print len(message) print '----------------' phone=request.args.get('phone') print phone a=New() a.LoadDB(message,phone); return message+str(phone)#print phone# return {"param":request.args.get('abc')}if __name__ == '__main__': app.run(host='0.0.0.0',port=6001,debug=True) [root@yyjk flask]# python mojo.py * Running on http://0.0.0.0:6001/ (Press CTRL+C to quit) * Restarting with stat * Debugger is active! * Debugger PIN: 677-847-682
python flask get传参
最新推荐文章于 2022-10-17 10:05:52 发布
![](https://img-home.csdnimg.cn/images/20240611030827.png)