#include "QtTestRestFulDemo.h"
#include #include #include #include QtTestRestFulDemo::QtTestRestFulDemo(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
connect(ui.pushButton_GET, SIGNAL(clicked()), this, SLOT(OnGETSlot()));
connect(ui.pushButton_POST, SIGNAL(clicked()), this, SLOT(OnPOSTSlot()));
}
void QtTestRestFulDemo::SendAndGetText(QString strUrl, MyMethod thod, QString strInput, QString &strMessage,QString &strResult)
{
QNetworkRequest oNetRequest;
oNetRequest.setUrl(QUrl(strUrl));
oNetRequest.setRawHeader("Content-Type", "application/octet-stream");
//oNetRequest.setRawHeader("Content-Type", "application/json");
//oNetRequest.setRawHeader("Content-Type", "application/xml");
//oNetRequest.setRawHeader("Content-Type"