FemaLocalSoftware/httpclient.h
Lopata PC 4de8b88fee Scrolling sensors ready.
Need to:
1)write beautiful code for flow layout.
2)start making flow windows.
3)start making second window.
2024-12-09 11:30:43 +03:00

26 lines
553 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 put(const QString &url, const QJsonObject &json);
private:
QNetworkAccessManager *networkManager;
QJsonObject processReply(QNetworkReply *reply);
};
#endif // HTTPCLIENT_H