Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. How to do “curl -X PUT -d someASCII 192.168.1.1:80”
Forum Updated to NodeBB v4.3 + New Features

How to do “curl -X PUT -d someASCII 192.168.1.1:80”

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 764 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.
  • MarkusLM Offline
    MarkusLM Offline
    MarkusL
    wrote on last edited by
    #1

    Hello All,

    I am stuck programming something that does the same as “curl -X PUT -d someASCII 192.168.1.1:80”. This is the code, it open the connections but my data “someASCII” is not coming:

    QUrl url("http://192.168.1.1:80");
    QNetworkRequest request(url);
    request.setHeader(QNetworkRequest::ContentTypeHeader,"application/x-www-form-urlencoded");
    QNetworkAccessManager qnam;
    qnam.put(request,”someASCII”);
    

    This is what gets you the other side of the connection. The content length is right but I get no content:

    client received: PUT / HTTP/1.1
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 9
    Connection: Keep-Alive
    Accept-Encoding: gzip, deflate
    Accept-Language: en-US,*
    User-Agent: Mozilla/5.0
    Host: 192.168.1.1:80
    

    Any suggestions?

    Thanks
    Markus

    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