【发布时间】:2017-02-27 18:41:03
【问题描述】:
我正在通过 cUrl 发送文本
curl -X POST -d "Separate account charge and opdeducted fr" http://192.168.50.8/text
并尝试得到
@application.route("/text",methods=['POST'])
def clausIE():
content = request.data
text = str(content, encoding="utf-8")
但是得到空字符串,我做错了什么?
注意:我用的是Python3.6
【问题讨论】:
-
嗯,你需要在条款IE中返回一些东西。
-
使用
request.get_data()代替request.data应该可以解决问题。
标签: python python-3.x curl post flask