Unsolved How to do “curl -X PUT -d someASCII 192.168.1.1:80”
-
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