You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
749 B

#ifndef HTTPSERVICE_H
#define HTTPSERVICE_H
#include <QObject>
#include <QtNetwork>
class HttpService : public QObject
{
Q_OBJECT
public:
explicit HttpService(QObject *parent = 0);
QByteArray get(QUrl url, quint32 timeoutInMs = 5000);
QByteArray postJson(QUrl url,const QByteArray &json, quint32 timeoutInMs = 5000);
private:
QNetworkAccessManager *mManager;
signals:
public slots:
void login(QString username,QString password);
void updateStatus(QString firstAidId,QString status);
void sendIdcardInfo(QString idcard,QString name,QString sex,QString nation);
void oneKeyStart(QString idcard);
void onComplexOneKeyStart(QString idcard,QString name,QString sex,QString nation);
};
#endif // HTTPSERVICE_H