Details
-
Task
-
Resolution: Unresolved
-
Not Evaluated
-
6.9.0 FF
Description
There is an Api for adding a routes that can run asynchronously and return a
QFuture<QHttpServerResponse>. However that will always send the entire response back to the client when the response is finished, in the mean time the response is stored in the QHttpServerResponse object.. There is no way to send one chunk of data at a time back to the client.
Add an API for responding one chunk at a time. This can be done by adding a route that takes QHttpServerRequest and a new class QAsyncHttpServerResponder as arguments.
Like this:
server.route("test", [] (const int page, const QHttpServerRequest &request, QAsyncHttpServerResponder& asyncResponder) {
QtConcurrent::run([request]()
);
});
Attachments
Issue Links
- resulted from
-
QTBUG-75081 Improve the implementation of concurrent processing in the Qt HTTP server and document it
- Closed