TreeFrogFramework 2.10
Loading...
Searching...
No Matches
thttpclient.h
Go to the documentation of this file.
1#pragma once
2#include <TGlobal>
3
4class QNetworkAccessManager;
5class QNetworkReply;
6class QNetworkRequest;
7class QJsonDocument;
8
9
11public:
14
15 QNetworkReply *get(const QUrl &url, int msecs = 5000);
16 QNetworkReply *get(const QNetworkRequest &request, int msecs = 5000);
17 QNetworkReply *post(const QUrl &url, const QJsonDocument &json, int msecs = 5000);
18 QNetworkReply *post(const QNetworkRequest &request, const QByteArray &data, int msecs = 5000);
19 QNetworkReply *put(const QUrl &url, const QJsonDocument &json, int msecs = 5000);
20 QNetworkReply *put(const QNetworkRequest &request, const QByteArray &data, int msecs = 5000);
21 QNetworkReply *deleteResource(const QUrl &url, int msecs = 5000);
22 QNetworkReply *deleteResource(const QNetworkRequest &request, int msecs = 5000);
23
24 QNetworkAccessManager *manager() { return _manager; }
25
26private:
27 QNetworkAccessManager *_manager {nullptr};
28};
29
The THttpClient class can send HTTP requests to another server and receive replies.
Definition thttpclient.h:10
QNetworkAccessManager * manager()
Definition thttpclient.h:24
#define T_CORE_EXPORT
Definition tdeclexport.h:28