[SOLVED]Read QNwtworkReply
Qt Creator and other tools
4
Posts
2
Posters
1.3k
Views
1
Watching
-
Hi , In a QNetworkReply i have a non html reply , how do i read this ? readAll() returns nothing . For eg . http://ubaid.tk/sms/sms.aspx?uid=rajatgupta431&pwd=88888888888t&msg=om namashivaye&phone=9872372031&provider=indyarocks
-
readAll() should return content even if it is JSON, or plain text. Try to check that returned HTTP code is 200 with:
@
reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
@
Or try to check reply error string with:
@
reply->errorString();
@ -
Thanks for the reply !
I was calling readAll() twice due to which I got nothing .
But now its solved . :)