[Qt-interest] How to: send large amount of data to server through POST.
Thiago Macieira
thiago at kde.org
Fri Feb 19 13:01:40 CET 2010
Em Sexta-feira 19 Fevereiro 2010, às 11:51:43, Mohammed Imran B escreveu:
> Hi,
>
> I have a large amount of data which I want to send to the server through
> POST method.
> What is the efficient way in which I can send the data in a single request,
> I mean which is the best container to store large data and send it.
You don't have much of an option.
QNetworkAccessManager can only post from a QIODevice or from a QByteArray. So
if your data is in a file, pass it directly. If it's coming from a socket or a
sub-process, do it too.
If you have to generate the data, you can either prepare a QByteArray with all
the data, or you can create a QIODevice that streams the data to
QNetworkAccessManager on demand.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100219/dc8ec785/attachment.bin
More information about the Qt-interest-old
mailing list