123456789101112131415161718192021222324252627282930313233 |
- #ifndef HTTPCLIENT_H
- #define HTTPCLIENT_H
- #include <QObject>
- #include <QNetworkAccessManager>
- #include <QFile>
- #include <QNetworkReply>
- #include <windows.h>
- #include <QEventLoop>
- #include <QDataStream>
- #include <QFileInfo>
- #include <QHttpMultiPart>
- #include <QSslConfiguration>
- class HttpClient : public QObject
- {
- Q_OBJECT
- public:
- HttpClient();
- //备用接口,用来传文件
- bool post(QString strUrl, QString filePath, QString * errString);
- //连接服务器,发送和接收数据,接口3
- bool postQString(QString strUrl, QString strName, QString * errString, QString *getCardBox);
- private:
- QNetworkAccessManager *m_Manager_;
- QNetworkAccessManager *m_Manager_QString;
- };
- #endif // HTTPCLIENT_H
|