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. Handling http request in qt app
Forum Updated to NodeBB v4.3 + New Features

Handling http request in qt app

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 3 Posters 1.2k 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.
  • natalieongN Offline
    natalieongN Offline
    natalieong
    wrote on last edited by natalieong
    #1

    Dear Genius,

    I need to capture from the input data of html application from my qt application. If I don't use web socket and Qtcpsocket, is there any way to get the data from my qt app?

    I want my application to be like web server.
    Thanks in advance.

    VRoninV 1 Reply Last reply
    0
    • natalieongN natalieong

      Dear Genius,

      I need to capture from the input data of html application from my qt application. If I don't use web socket and Qtcpsocket, is there any way to get the data from my qt app?

      I want my application to be like web server.
      Thanks in advance.

      VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      @natalieong said in Getting data from the html page in application:

      I need to capture from the input data of html application from my qt application.

      What exactly are you trying to do?

      be like web server

      The web server functionality of Qt is still in the prototype stage so if that's what you need you will have to use a 3rd party app

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      natalieongN 1 Reply Last reply
      0
      • VRoninV VRonin

        @natalieong said in Getting data from the html page in application:

        I need to capture from the input data of html application from my qt application.

        What exactly are you trying to do?

        be like web server

        The web server functionality of Qt is still in the prototype stage so if that's what you need you will have to use a 3rd party app

        natalieongN Offline
        natalieongN Offline
        natalieong
        wrote on last edited by
        #3

        @VRonin Thanks for the reply. Basically, my qt app needs to handle the http request . Html page will try to connect to my qt app and it will send some data (json or xml). I need to parse those data and needs to do some processing.

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

          Hi and welcome to devnet,

          So your application is a web server that is going to be called from some foreign site ?

          Maybe the Cutelyst project could be of use.

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

          natalieongN 1 Reply Last reply
          1
          • SGaistS SGaist

            Hi and welcome to devnet,

            So your application is a web server that is going to be called from some foreign site ?

            Maybe the Cutelyst project could be of use.

            natalieongN Offline
            natalieongN Offline
            natalieong
            wrote on last edited by natalieong
            #5

            @SGaist said in Handling http request in qt app:

            foreign

            Thank for the reply. Basically, I have the html application for frontend and c++ for backend. Backend needs to get the data from html when the user click the button using http protocols.
            I could send a request to a server and receive a reply using QNetworkAccessManager.
            What I need is something like a socket that, when a request comes in, produces an object
            where I can pick url of this request, so I can process and send out an appropriate reply.

            Am I just blind or is nothing like this in the Qt framework? If so, can you recommend alternatives?
            There is the QhttpServer : https://github.com/nikhilm/qhttpserver and is it suitable for my case?

            Thanks in advance.

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

              Can you explain what you mean by backend ?

              In any case, you need something to send your front end to your client, so what are you using currently ?

              As for the communication, are you thinking of something like QWebSocket ?

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

              natalieongN 1 Reply Last reply
              0
              • SGaistS SGaist

                Can you explain what you mean by backend ?

                In any case, you need something to send your front end to your client, so what are you using currently ?

                As for the communication, are you thinking of something like QWebSocket ?

                natalieongN Offline
                natalieongN Offline
                natalieong
                wrote on last edited by natalieong
                #7

                @SGaist , Sorry to confused you, the backend application is going to be called from some foreign site. The backend application needs to handle the http request from this foreign site(html). So, server and client is in different location. My question is that what is the best way of communication to handle http request from html page to c++? Thank you so much.

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

                  Well, like I already suggested cutelyst is likely what you want. It's a C++ WebServer that allows you to also directly work with Qt.

                  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
                  2

                  • Login

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