Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. 3rd Party Software
  4. REST Api for QT app
Forum Updated to NodeBB v4.3 + New Features

REST Api for QT app

Scheduled Pinned Locked Moved 3rd Party Software
13 Posts 8 Posters 30.6k Views 4 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    You need to create a server with Qt. It's possible, yes, and will get even easier in the future, as there is some interest in the general area.

    For now, I'll just push some Qt classes at you. Investigate, then come back if there are any questions.

    In general, the central point of Qt Network module is QNetworkAccessManager. For creating a daemon (or service, as Windows folks keep naming them), you can take a look at "QtService":https://qt.gitorious.org/qt-solutions/qt-solutions/source/80592b0e7145fb876ea0e84a6e3dadfd5f7481b6:qtservice addon.

    (Z(:^

    1 Reply Last reply
    2
    • T Offline
      T Offline
      tgnr
      wrote on last edited by
      #3

      Thank's you.

      So, i take a look to QTService and try to run the example of http server.
      But i get an error : "The service Qt HTTP Daemon could not start ..."
      I'm newbie in C++ and QT, so i take a look at qtservice.cpp but i still incapable to identify my problem ..

      Any idea ?

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #4

        No sorry, I've never used that module. There is a plan to add a new QApplication-like class for creating daemons, but I think it's not integrated yet.

        (Z(:^

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tgnr
          wrote on last edited by
          #5

          Ok thanks.
          Finally, i use "qhttpserver": https://github.com/nikhilm/qhttpserver to create my server HTTP .
          Is it a library in QT for create REST API ? or did i have to create ressources(REST) myself ?

          1 Reply Last reply
          2
          • sierdzioS Offline
            sierdzioS Offline
            sierdzio
            Moderators
            wrote on last edited by
            #6

            There is no build-in support for REST in Qt. Maybe there is some in QHttpServer, I don't know.

            (Z(:^

            1 Reply Last reply
            1
            • T Offline
              T Offline
              tgnr
              wrote on last edited by
              #7

              Ok, thanks you.

              G.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                huytard
                wrote on last edited by
                #8

                QttpServer
                https://github.com/supamii/QttpServer

                Try QttpServer for an RESTish API server:

                • Qt provides support for JSON, logging
                • URL routing
                • libuv performance
                • MongoDB friendly
                • Redis friendly
                1 Reply Last reply
                3
                • kafegK Offline
                  kafegK Offline
                  kafeg
                  wrote on last edited by
                  #9

                  Hi!

                  Please see to my rest client implementation https://forum.qt.io/topic/64999/qt-rest-client-beta

                  1 Reply Last reply
                  1
                  • A Offline
                    A Offline
                    Antony007
                    wrote on last edited by
                    #10

                    You can try https://github.com/Antony007/Qt-Http-Rest-File-Server

                    1 Reply Last reply
                    0
                    • H Offline
                      H Offline
                      h00bs
                      wrote on last edited by h00bs
                      #11

                      If anyone is looking for a way to connect to a REST api, we've written a tutorial with an open-source example app, that connects to a weather REST service: https://v-play.net/cross-platform-app-development/access-rest-services-qt-v-play-weather-service-example-app-open-source

                      Developer at Felgo - https://felgo.com/qt

                      Develop mobile Apps for iOS & Android with Qt
                      Develop Games with Qt

                      Felgo is an official Qt Technology Partner

                      raven-worxR 1 Reply Last reply
                      0
                      • H h00bs

                        If anyone is looking for a way to connect to a REST api, we've written a tutorial with an open-source example app, that connects to a weather REST service: https://v-play.net/cross-platform-app-development/access-rest-services-qt-v-play-weather-service-example-app-open-source

                        raven-worxR Offline
                        raven-worxR Offline
                        raven-worx
                        Moderators
                        wrote on last edited by
                        #12

                        @h00bs
                        the OP was asking for a REST API server/provider, rather than a REST client.

                        --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
                        If you have a question please use the forum so others can benefit from the solution in the future

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

                          Something like Cutelyst

                          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
                          3

                          • Login

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