FemaLocalSoftware/httpclient.h
Lopata PC 9e459078e1 SensorTab all Done
paginationBar Done
2024-12-16 11:38:04 +03:00

27 lines
595 B
C++

#ifndef HTTPCLIENT_H
#define HTTPCLIENT_H
#include <QJsonObject>
#include <QObject>
class QNetworkAccessManager;
class QNetworkReply;
class HttpClient : public QObject
{
Q_OBJECT
public:
explicit HttpClient(QObject *parent = nullptr);
QJsonObject get(const QString &url);
QJsonObject post(const QString &url, const QJsonObject &json);
QJsonObject post(const QString &url);
QJsonObject put(const QString &url, const QJsonObject &json);
private:
QNetworkAccessManager *networkManager;
QJsonObject processReply(QNetworkReply *reply);
};
#endif // HTTPCLIENT_H