Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Posting to Thingspeak
Qt 6.11 is out! See what's new in the release blog

Posting to Thingspeak

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 2.9k 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
    GeorgeIoak
    wrote on last edited by
    #1

    I searched the forums and internet and was surprised that I could not find examples of any Qt apps posting to Thingspeak. Did I miss some helpful examples somewhere?

    Thingspeak API

    --George

    jsulmJ 1 Reply Last reply
    0
    • G GeorgeIoak

      I searched the forums and internet and was surprised that I could not find examples of any Qt apps posting to Thingspeak. Did I miss some helpful examples somewhere?

      Thingspeak API

      --George

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @GeorgeIoak Well, this is a REST API, you use it as any other REST API. Why do you need specific Qt example? Take a look at Qt networking and its examples: http://doc.qt.io/qt-5/qtnetwork-index.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • G Offline
        G Offline
        GeorgeIoak
        wrote on last edited by
        #3

        Thanks, I'm quite new to Qt and slowly learning so I was just looking for some examples as I hadn't done any networking tasks with Qt yet.

        It looks as though I should use QNetworkAccessManager and then is it as simple as following this example:

        QNetworkAccessManager *manager = new QNetworkAccessManager(this);
        connect(manager, SIGNAL(finished(QNetworkReply*)),
                this, SLOT(replyFinished(QNetworkReply*)));
        
        manager->get(QNetworkRequest(QUrl("http://qt-project.org")));
        

        Except perhaps replacing the get with post?

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

          Hi,

          And also change the address and call one of the end point described here ?

          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
          • G Offline
            G Offline
            GeorgeIoak
            wrote on last edited by
            #5

            Yes, I got it working this afternoon. It seems to work with get. I haven't handled any of the replies or error checks but I found another example and together with this it's working.

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

              It all depends on the endpoint you are calling and how it's implemented on the other hand. The documentation tells which one you should use.

              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