Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Get/Set cookies from qml
Forum Updated to NodeBB v4.3 + New Features

Get/Set cookies from qml

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 3.6k 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.
  • G Offline
    G Offline
    ginuerzh
    wrote on last edited by
    #1

    Hi all:
    I am writting a client program. When I login, the server will send some cookies to me in the 'Set-Cookie' header field. I need to get the cookies, because the rest of the request will need them.

    I try to get the cookies with xmlhttprequest.getResponseHeader("Set-Cookie"), but failed. I don't want to use C++, so could it be possible?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      daliusd
      wrote on last edited by
      #2

      That's impossible from QML. There is code in quite low level that basically prevents cookies. That code is done because of security issues but is completely irrelevant to QML.

      1 Reply Last reply
      0
      • I Offline
        I Offline
        imihajlov
        wrote on last edited by
        #3

        QML is not a browser, it doesn't have any cookies.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          daliusd
          wrote on last edited by
          #4

          imihajlov, what if I want to write browser using QML?

          1 Reply Last reply
          0
          • I Offline
            I Offline
            imihajlov
            wrote on last edited by
            #5

            If you want to write a browser you should make some low-level c++ components that make cookies and everything available from QML :)

            1 Reply Last reply
            0
            • D Offline
              D Offline
              daliusd
              wrote on last edited by
              #6

              Exactly. While there is no reason why that shouldn't be possible using pure QML.

              P.S. Maybe that's possible using webkit but that's different topic.

              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 Extensions
              • Unsolved