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. QNetworkAccessManager post method with arguments.
QtWS25 Last Chance

QNetworkAccessManager post method with arguments.

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 234 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.
  • U Offline
    U Offline
    Uday More
    wrote on last edited by
    #1

    Hello Team,
    I have to use post method to call the URL"http://myserver:4001/ticket_management/tasks" given below with additional arguments

    1. hours_spent:<float value>
    2. comment:<optional>

    How can post this using QNetworkAccessManager. I tried using QHttpMultiPart but wasn't successful.

    Please can anyone give a sample code on how to form the QHttpMultipart for this post message.

    Thanks in advance.

    Pablo J. RoginaP 1 Reply Last reply
    0
    • U Uday More

      Hello Team,
      I have to use post method to call the URL"http://myserver:4001/ticket_management/tasks" given below with additional arguments

      1. hours_spent:<float value>
      2. comment:<optional>

      How can post this using QNetworkAccessManager. I tried using QHttpMultiPart but wasn't successful.

      Please can anyone give a sample code on how to form the QHttpMultipart for this post message.

      Thanks in advance.

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

      @Uday-More said in QNetworkAccessManager post method with arguments.:

      with additional arguments

      you may want to look at this SO question to see how QUrlQuery::addQueryItem method is used to care for the param/value pairs which are then sent as part for the data of the POST request

      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

      U 1 Reply Last reply
      3
      • Pablo J. RoginaP Pablo J. Rogina

        @Uday-More said in QNetworkAccessManager post method with arguments.:

        with additional arguments

        you may want to look at this SO question to see how QUrlQuery::addQueryItem method is used to care for the param/value pairs which are then sent as part for the data of the POST request

        U Offline
        U Offline
        Uday More
        wrote on last edited by
        #3

        @Pablo-J-Rogina . Done. Thanks resolved the problem.

        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