PDA

View Full Version : Http post



Max123
30th May 2010, 13:22
Hi,

I have a Wireshark log:

POST /start.login HTTP/1.1\r\n
[Expert Info (Chat/Sequence): POST /start.login HTTP/1.1\r\n]
[Message: POST /start.login HTTP/1.1\r\n]
[Severity level: Chat]
[Group: Sequence]
Request Method: POST
Request URI: /start.login
Request Version: HTTP/1.1
Host: IP\r\n
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)\r\n
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3\r\n
Accept-Encoding: gzip,deflate\r\n
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
Keep-Alive: 115\r\n
Connection: keep-alive\r\n
Referer: http://IP/hcti_start_passwort.htm\r\n
Content-Type: application/x-www-form-urlencoded\r\n
Content-Length: 11\r\n
[Content length: 11]
\r\n
Line-based text data: application/x-www-form-urlencoded
P1=PASSWORD

Now I want to send this POST with a Qt Program. I think I have to start with:

QHttp http;
http.setHost("IPl");

But how I can create the request?

tbscope
30th May 2010, 13:43
I suggest you look here:
http://doc.qt.nokia.com/4.6/qnetworkaccessmanager.html