【发布时间】:2021-05-16 22:28:08
【问题描述】:
我有这段代码,它是一个 post 方法(Python Flask),
@application.route('/try', methods=['POST'])
def tryPost() :
content = "```" + str(request.json) + "```"
return jsonify(content)
当我在本地运行应用程序并将邮递员上的 json 发布到 http://127.0.0.1:5000/try 时,我可以看到相同的 json 结果。
但是在我将我的应用程序推送到 aws elastic beanstalk 之后,我发布了相同的方法,它返回了 "```None```"
是什么原因?
这是示例 json
{
"api_app_id": "A02",
"token": "Shh_its_a_seekrit",
"container": {
"type": "message",
"text": "The contents of the original message where the action originated"
}
}
【问题讨论】:
标签: python amazon-web-services flask amazon-elastic-beanstalk