Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt Rest Api Client
Forum Updated to NodeBB v4.3 + New Features

Qt Rest Api Client

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
5 Posts 3 Posters 671 Views 2 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.
  • NickVN Offline
    NickVN Offline
    NickV
    wrote on last edited by
    #1

    Hello guys.
    I want a rest api client in order to use it into my mobile app. I want this client to manage the access_token and refresh_token. Is there such client?

    ODБOïO 1 Reply Last reply
    0
    • NickVN NickV

      Hello guys.
      I want a rest api client in order to use it into my mobile app. I want this client to manage the access_token and refresh_token. Is there such client?

      ODБOïO Offline
      ODБOïO Offline
      ODБOï
      wrote on last edited by ODБOï
      #2

      @NickV hi

      in QML/js you can use JSON and XMLHttpRequest

       Component.onCompleted: {
      
              var req = new XMLHttpRequest();
              req.open("GET","https://httpbin.org/get",true);
              req.onreadystatechange = function() {
      
                  if (req.readyState === XMLHttpRequest.DONE && req.status === 200) {
      
                      //console.log(req.responseText)
                      var jsonObject = JSON.parse(req.responseText);
                      console.log(jsonObject.origin)
      
                  }
              }
              req.send();
          }
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        You might be interested by the Cutelyst project.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • NickVN Offline
          NickVN Offline
          NickV
          wrote on last edited by
          #4

          @LeLev hi
          This solution is not checking the expiration time of the token, and also not uses tokens. I need to use tokens because my api is protected.

          @SGaist hi.
          I don't think that Cutelyst is this that i am looking for. Cutelyst is for creating an api. Also as far as i look the Cutelyst is not uses tokens (access_token and refresh_token) but only CSRF token. Let me know if i am telling something wrong.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            So thinking about the QtNetworkAuth module ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            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