QApplication app(argc, argv);
QByteArray content("login=root&passwd=root");
QHttpRequestHeader header("POST", "login.yahoo.com/config/login?");
header.setValue("Host", "login.yahoo.com/config/login?");
header.setContentType("application/x-www-form-urlencoded"); // important
header.setContentLength(content.length());
// request
QFile file("result.html");
QHttp http("login.yahoo.com/config/login?");
http.request(header, content, &file);
QUrl url2(http->text());
app.connect(&http, SIGNAL(done(bool)), &app, SLOT(quit()));
Bookmarks