Hi all,

I am quite new to QHttp and now I have my first Problem with a QHttp request.

hier my Code:

Qt Code:
  1. void MainWindow::on_pb_getIMDB_clicked()
  2. {
  3. httpRequestAborted = false;
  4.  
  5. QHttpRequestHeader header("GET", "/find?s=all&q=300&x=15&y=7 HTTP/1.1");
  6. header.setValue("Host", "german.imdb.com");
  7. header.setValue("User-Agent", "Mozilla/5.0 (X11; U; LinuMozx i686; de; rv:1.9.0.1) Gecko/2008070400 SUSE/3.0.1-8.1 Firefox/3.0.1");
  8. header.setValue("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
  9. header.setValue("Accept-Language", "de-ch,de;q=0.8,de-de;q=0.6,en-us;q=0.4,en;q=0.2");
  10. header.setValue("Accept-Encoding", "gzip,deflate");
  11. header.setValue("Accept-Charset", "ISO-8859-1,utf-8;q=0.7,*;q=0.7");
  12. header.setValue("Keep-Alive", "300");
  13. header.setValue("Connection", "keep-alive");
  14.  
  15. http->setHost( "german.imdb.com" );
  16. httpGetId = http->request( header );
  17. }
  18.  
  19. void MainWindow::httpRequestFinished( int requestId, bool error )
  20. {
  21. if (requestId != httpGetId)
  22. return;
  23.  
  24. if ( error )
  25. {
  26. QMessageBox::information( this, tr( "HTTP" ),
  27. tr( "Download failed: %1." )
  28. .arg( http->errorString() ));
  29. }
  30. else
  31. {
  32. QByteArray m_data = http->readAll();
  33.  
  34. qDebug() << QString::number( m_data.size() );
  35. QString text(m_data.data());
  36. te_test->setText( text );
  37. }
  38. }
To copy to clipboard, switch view to plain text mode 

The signals and slots are working correctly. The size I receive is around 8298 bytes, but I can not read them. I mean, I should receive some HTML stuff (I think so) but if I try to put them into a file or a text field it does not show me anything.

Do I something wrong? May someone give me an advice please?

Regards
big4mil