python Flask post 数据 输出

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from flask import Flask
from flask import request
from flask import Response


app = Flask(__name__)

@app.route('/rtxim', methods=['POST'])
def rtxim_post():
    print str(request.get_data())
    return '%s' % (request.get_data() or 'null')
    
if __name__ == '__main__':
    app.run('0.0.0.0',port=4492)


posted @ 2018-10-08 15:45  鸾舞春秋  阅读(2934)  评论(0编辑  收藏  举报