I use the following code to send a request to a server :
Qt Code:
  1. int misc::getUrl( const QString & host, const QString & url, QHttp * pHttp, QIODevice * pDevice, const QString & referer )
  2. {
  3. qDebug( "getUrl host=%s url=%s", qPrintable( host ), qPrintable( url ) );
  4. Proxy p = proxy();
  5. if ( p.Enabled )
  6. pHttp->setProxy( p.Host, p.Port, p.Login, p.Password );
  7. pHttp->setHost( host );
  8. QHttpRequestHeader header( "GET", url, 1, 1 );
  9. header.setValue( "Host", host );
  10. if ( !referer.isEmpty() )
  11. header.setValue( "Referer", referer );
  12. header.setContentLength( 0 );
  13. return pHttp->request( header, 0, pDevice );
  14. }
To copy to clipboard, switch view to plain text mode 


It works very well, trouble is I cannot get the status result of the request that I expect to get through pDevice. I tried pDevice->data(), pDevice.readLine but nothing comes back. The request does what it should do but it won't tell me what it did.

I assume this getUrl stuff is widespread (I got it from some friend), maybe you can tell me or hint at how I could get a status result !!

No need to say that I am NOT an intermediate user, hardly a novice...