Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED]Read QNwtworkReply
Qt 6.12 LTS is out! See what's new in the release blog

[SOLVED]Read QNwtworkReply

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 2 Posters 2.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      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();
      @

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks for the reply !
        I was calling readAll() twice due to which I got nothing .
        But now its solved . :)

        1 Reply Last reply
        0
        • ? Offline
          ? Offline
          A Former User
          wrote on last edited by
          #4

          Well, thats great!:)
          You can mark your post as solved by adding [Solved] in its title

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt
          • Unsolved