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. Problems with HTTP POST X-www-form-urlencoded key with dots or _
QtWS25 Last Chance

Problems with HTTP POST X-www-form-urlencoded key with dots or _

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

    Hi All,

    When I do a HTTP POST request with the following item:

    postData.addQueryItem("com.collibra.dgc.core.dto.io.connector.JSONDataTableOutputConnectorFactory_sEcho", "0");
    

    I get a response that the parameter isn't set.
    Is it possible that the cause of this issue is because there are dots or underscores in the key?
    And how to solve this?

    I can do a POST request in Postman with this key and value.

    Wkr,
    Grove

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

      Hi and welcome to devnet,

      Can you show the complete request build ?
      Did you check what was sent ?

      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
        Grove
        wrote on last edited by
        #3

        Hi Sgaist and thanks,

        request.setUrl(QUrl("https://url"));
        QUrlQuery postData;
        postData.addQueryItem("outputConnector", "com.collibra.dgc.core.dto.io.connector.JSONDataTableOutputConnectorFactory");
        postData.addQueryItem("com.collibra.dgc.core.dto.io.connector.JSONDataTableOutputConnectorFactory_sEcho", "0");
        request.setRawHeader("Authorization", headerData.toLocal8Bit());
        request.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
        manager->post(request, postData.toString().toUtf8());
        

        How can I check was is send?

        Pablo J. RoginaP 1 Reply Last reply
        0
        • G Grove

          Hi Sgaist and thanks,

          request.setUrl(QUrl("https://url"));
          QUrlQuery postData;
          postData.addQueryItem("outputConnector", "com.collibra.dgc.core.dto.io.connector.JSONDataTableOutputConnectorFactory");
          postData.addQueryItem("com.collibra.dgc.core.dto.io.connector.JSONDataTableOutputConnectorFactory_sEcho", "0");
          request.setRawHeader("Authorization", headerData.toLocal8Bit());
          request.setRawHeader("Content-Type", "application/x-www-form-urlencoded");
          manager->post(request, postData.toString().toUtf8());
          

          How can I check was is send?

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @grove said in Problems with HTTP POST X-www-form-urlencoded key with dots or _:

          How can I check was is send?

          Wireshark is your friend (network traffic capture/analyzer)

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • G Offline
            G Offline
            Grove
            wrote on last edited by Grove
            #5

            Is there a way to let tell Qt what is send?
            Because i'm on a VPN line and it's a ssl connection it's not easy to get the data

            Pablo J. RoginaP 1 Reply Last reply
            0
            • G Grove

              Is there a way to let tell Qt what is send?
              Because i'm on a VPN line and it's a ssl connection it's not easy to get the data

              Pablo J. RoginaP Offline
              Pablo J. RoginaP Offline
              Pablo J. Rogina
              wrote on last edited by
              #6

              @grove said in Problems with HTTP POST X-www-form-urlencoded key with dots or _:

              Because i'm on a VPN line and it's a ssl connection it's not easy to get the data

              Just for debugging purposes, change the URL to some local non-SSL test server and capture the traffic then.

              Upvote the answer(s) that helped you solve the issue
              Use "Topic Tools" button to mark your post as Solved
              Add screenshots via postimage.org
              Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

              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