PDA

View Full Version : qhttp



incapacitant
1st August 2006, 20:37
2nd try with ie rather than firefox...

when i use :


//************************************************** ***************************
void ApplicationWindow::receivePbStartAmazonFr()
//************************************************** ***************************
{
// indicate that now we have to wait
QApplication::setOverrideCursor( QCursor( Qt::WaitCursor ) );
// target url
QUrl url("http://www.amazon.fr");
// http://www.amazon.fr/exec/obidos/tg/browse/-/405320
// http://www.amazon.fr
http = new QHttp(this);
connect(http, SIGNAL(requestFinished(int, bool)), this, SLOT(receiveP01AmazonFr(int, bool)));
// remember to set the host
http->setHost(url.host());
// the resulting data will be stored in the buffer
buffer = new QBuffer(this);
http->get(url.toString(), buffer);
}

I get a valid buffer but two errors :
- An unknown error has occurred. (int=1)
- The host name lookup failed. (int=2)
If I use the redirection url returned i get no buffer and the same two errors.
Can somebody help me ?

incapacitant
1st August 2006, 20:39
you can ignore the additional html coding.
i can't make it disappear.
it is not in the code, the code has just h t t p : / / w w w... :p