"Host not found" Error message with QHttp service
Hi..
I am doing an application, that fetches data from a website(Url) using QHttp service and stores data in a file in XML format.
I am able to fetch data from the link and as such the .xml file is created in current directory...but only in case of Simulator. However when I tried it on my N97 device, I am getting an error like:
[QUOTE]Host not found[/QUOTE]
Any guesses....
Thanks....
Re: "Host not found" Error message with QHttp service
did you remember to add the symbian capability [B]NetworkServices [/B] that is required for the API usage in a device.
Re: "Host not found" Error message with QHttp service
Thanks.. It's working...
We have to use
QT += core gui [B]network [/B]xml
and
symbian {
TARGET.UID3 = 0xe854433c
TARGET.CAPABILITY += [B]NetworkServices[/B]
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x4000000
}
in .pro file to avoid this kind of error.
Re: "Host not found" Error message with QHttp service
There is a bug in OpenC that may cause this. More info available at:
[url]http://bugreports.qt.nokia.com/browse/QTBUG-8687[/url]
Re: "Host not found" Error message with QHttp service
And you should not be using QHttp as it's deprecated, you should use QNetworkAccessManager.
Re: "Host not found" Error message with QHttp service
Thanks divanov..
I think, I should use QNetworkAccessManager, because yesterday my application was working fine with QHttp, but suddenly today it is again giving that [B][I][U]Host not found [/U][/I][/B] error.
Let me try with QNetworkAccessManager.
By the way, any idea why this has happened, I have the same code with me!!!
Re: "Host not found" Error message with QHttp service
Please note that QNetworkAccessManager is affected by mentioned earlier OpenC bug in the same way as QHttp.