[Qt-interest] cancel http requests
Atlant Schmidt
aschmidt at dekaresearch.com
Thu Aug 25 16:42:04 CEST 2011
Mandeep:
But that doesn't actually have any effect on the
server, does it? There's no way in the HTTP protocol
to cancel an in-flight request; one can just ignore
the data returned by the server.
It's not nice, of course, to set the server working
on a bunch of stuff one will end up ignoring; the
server probably has other clients who are waiting.
Atlant
-----Original Message-----
From: qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com [mailto:qt-interest-bounces+aschmidt=dekaresearch.com at qt.nokia.com] On Behalf Of Mandeep Sandhu
Sent: Thursday, August 25, 2011 10:01
To: Sergey
Cc: qt-interest at qt.nokia.com
Subject: Re: [Qt-interest] cancel http requests
> Is it possible to cancel some of previous http requests on the client
> side, so that server would not serve them?
It is, if you have a handle to QNetworkReply object that was returned
in your get/post method call (QNAM::get/post);
http://doc.qt.nokia.com/latest/qnetworkreply.html
You can call QNetworkReply::abort() to cancel the pending request.
HTH,
-mandeep
>
> --
> Thanks!
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
This e-mail and the information, including any attachments, it contains are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message.
Thank you.
Please consider the environment before printing this email.
More information about the Qt-interest-old
mailing list