[Qt-interest] [SOLVED] Re: QHttp howto get response code ? e.g 200 , 404
Thiago Macieira
thiago at kde.org
Tue Mar 16 14:45:24 CET 2010
Em Terça-feira 16 Março 2010, às 13:50:51, aaron lewis escreveu:
> Finally , i found there's an example in Qt (http client)
> I read that code , and found my problem.
>
> I didn't set the port.
>
> -snip-
> QString method = ui->methodBox->currentText();
> QUrl Url = QUrl(url);
>
> http->setHost(ui->webBox->currentText());
>
> QHttp::ConnectionMode mode = QHttp::ConnectionModeHttp;
> http->setHost(Url.host(), mode, 80);
> -snip-
> And then set up and connection to receive status code
>
> Thanks All ;-)
Please use QNetworkAccessManager for any new code. Don't use QHttp.
--
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/20100316/1746b246/attachment.bin
More information about the Qt-interest-old
mailing list