【发布时间】:2019-07-08 12:21:17
【问题描述】:
我正在尝试创建一个烧瓶服务,我想将来自一个 request.form 的数据以 json 格式发送到另一个 url,请谁能帮我实现这一目标?
redirect(url_for('any_method'), json = json.dumps(my_form_dict))
当我尝试执行上述代码时,出现以下错误:
TypeError: redirect() got an unexpected keyword argument 'json' The above is the error here.
【问题讨论】:
-
问题到底出在哪里?您已经有了解决方案,只需在第一条路线中通过
json=request.form... -
不,这不是解决方案。尝试运行时出现以下错误:TypeError:redirect() got an unexpected keyword argument 'json'
-
您能提供更多信息吗?你目前的结果是什么,你期待什么?任何错误信息,一些例子......
-
TypeError: redirect() got an unexpected keyword argument 'json' 以上是这里的错误..
-
好的,尝试编辑问题并添加此详细信息以使其更清晰。
标签: python redirect post flask