问题描述
我有一个django应用程序(前端),该应用程序将请求发送到 connexion api (后端).现在,我想向用户添加信息,以便在向我的api发出请求后实时了解请求的进度.
I have a django app (frontend) which sends requests to a connexion api (backend). Now I want to add info to the user to know the progression of the request in real-time upon making a request to my api.
示例:在我的django应用中,如果我提交表单,它将通过requests.post
启动请求,并向我显示一些文本(即:创建,删除,更新...)
Example: from my django app, if I submit a form it will launch a request via requests.post
and will show me some text ( ie: creating, deleting, updating ...)
我尝试使用flask-socketio,但没有找到如何完成此操作的示例. (与socketio连接)
I tried using flask-socketio but I found no example of how it could be done. (connexion with socketio)
PS:我想对我的api使用connexion,但是我不介意使用其他方法代替socketio
PS: I want to use connexion for my api but it there is something else to use instead of socketio I don't mind
推荐答案
我认为您不能.连接存储库中有一个未解决的问题 https://github.com/zalando/connexion/issues/832 自2018年以来尚未解决.
I don't think you can. There is an open question in the connection repository https://github.com/zalando/connexion/issues/832 since 2018 unsolved.
这篇关于是否可以与connexion一起使用flask_socketio?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!