Hello!
I tried to make a simple POST request using QWebView, but my PHP side saying that it is a GET :(
My QT code:
ui->mainWebViewInfoWnd->
load(QNetworkRequest(QUrl(QString("http://176.111.***.93/info"))),
QNetworkAccessManager::PostOperation,
QByteArray("key=value"));
My PHP code:
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
echo 'POST :)';
} else {
echo 'GET :(';
}
?>
As a result in my QWebView frame I got: “GET :(”
↧