1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| import flask app=flask.Flask(__name__)
from flask_cors import * CORS(app, supports_credentials=True)
@app.route("/path") def index(): try: p=flask.request.args.get("name") c=flask.request.args.get("sex") print(p,c) return p+","+c except Exception as err: return str(err)
if __name__=="__main__": app.run(host="0.0.0.0", port=5000)
|