#ifndef BILLSOCKET_H
#define BILLSOCKET_H

#include <QJsonObject>
#include <QJsonDocument>
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>

class BillSocket : public QObject
{
    Q_OBJECT
public:
    explicit BillSocket(QObject *parent=0);
    ~BillSocket();

    bool Request(const QJsonObject& requestJson, QJsonObject& recvJson, QString url, QString& error);

    static bool S_Request(const QJsonObject &requestJson, QJsonObject &recvJson, QString url, QString &error, QByteArray contentype = QByteArray("text/json"));
private:
    QNetworkAccessManager m_networkManger;
    //QNetworkRequest m_networkRequest;
};

#endif // BILLSOCKET_H
