Py学习  »  Python

使用python flask读取多个文件[重复]

python_interest • 5 年前 • 2390 次点击  

我想能够将数据发送到我的烧瓶应用程序。我试过进入 request.data 但它是一个空字符串。如何访问请求数据?

@app.route('/', methods=['GET', 'POST'])
def parse_request():
    data = request.data  # data is empty
    # need posted data here

这个问题的答案使我问 Get raw POST body in Python Flask regardless of Content-Type header 接下来,是获取原始数据,而不是解析的数据。

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/38056
 
2390 次点击  
文章 [ 16 ]  |  最新文章 5 年前