Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.7k views
in Technique[技术] by (71.8m points)

flask写的接口发送POST请求成功后没有返回数据?

微信截图_20200830155314.png微信截图_20200830155332.png

明明执行到了return,却没有返回任何数据。
直接发送get请求,却能返回数据是什么原因?

image.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

看你路由装饰器怎么不是 app.route, 这个有点奇怪。
另外,methods=['GET', 'POST'] 这是规范写法。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...