commodity_backingtrack_system/app/blockchain/client/test.py

20 lines
470 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# -*- coding: utf-8 -*-
from flask import Flask
from flask import request
import json
app = Flask(__name__)
@app.route("/test", methods=["POST"]) # 注意点一methods=["POST"] 而不是 methods="POST"必须卸载列表里面不写methods默认是get请求方式。
def get_method_args():
req = request.values
return "收到信息:%s" % (req)
if __name__ == '__main__':
app_port = 5000
app.run(host="0.0.0.0", port=app_port, debug=True)