ok. i have made the change ( using http.post now)
but still the same problem
Received error during HTTP fetch.
I have the following code to read the data and to check if the server has finished sending
{
qDebug() << "XML"<<http.readAll();
if (resp.statusCode() != 200)
http.abort();
else {
xml.addData(http.readAll());
parseXml();
}
}
void RSSListing::readData(const QHttpResponseHeader &resp)
{
qDebug() << "XML"<<http.readAll();
if (resp.statusCode() != 200)
http.abort();
else {
xml.addData(http.readAll());
parseXml();
}
}
To copy to clipboard, switch view to plain text mode
void RSSListing::finished(int id, bool error)
{
if (error) {
qWarning("Received error during HTTP fetch.");
lineEdit->setReadOnly(false);
abortButton->setEnabled(false);
fetchButton->setEnabled(true);
}
else if (id == connectionId) {
lineEdit->setReadOnly(false);
abortButton->setEnabled(false);
fetchButton->setEnabled(true);
}
}
void RSSListing::finished(int id, bool error)
{
if (error) {
qWarning("Received error during HTTP fetch.");
lineEdit->setReadOnly(false);
abortButton->setEnabled(false);
fetchButton->setEnabled(true);
}
else if (id == connectionId) {
lineEdit->setReadOnly(false);
abortButton->setEnabled(false);
fetchButton->setEnabled(true);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks