[英]How to send two response for a single post request in Django Rest Framework?
I am processing a video in backend but it's taking some time so I am looking for a way by which I can send the process time first and after it's completion I can send the video url.我正在后端处理视频,但需要一些时间,所以我正在寻找一种方法,通过它我可以先发送处理时间,然后在完成后我可以发送视频 url。
I tried using HttpResponse.write() but it didn't send the response.我尝试使用 HttpResponse.write() 但它没有发送响应。 I got response only after the completion of whole process.只有在整个过程完成后我才得到回应。
You need async method and use something like websocket.您需要异步方法并使用类似 websocket 的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.