This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/doric-Qt/doric/plugin/DoricNetworkPlugin.cpp

19 lines
733 B
C++
Raw Normal View History

2021-04-25 16:44:39 +08:00
#include "DoricNetworkPlugin.h"
2021-04-25 20:40:49 +08:00
#include "utils/DoricNetworkService.h"
2021-04-25 16:44:39 +08:00
2021-04-25 20:40:49 +08:00
#include <QCoreApplication>
2021-04-25 16:44:39 +08:00
#include <QJsonDocument>
#include <QJsonObject>
void DoricNetworkPlugin::request(QString jsValueString, QString callbackId) {
QJsonDocument document = QJsonDocument::fromJson(jsValueString.toUtf8());
QJsonValue jsValue = document.object();
2021-04-25 20:40:49 +08:00
DoricNetworkService::getInstance()->request(jsValue, qApp,
[](int code, QByteArray data) {
qDebug() << code;
qDebug() << data;
qDebug() << "";
});
2021-04-25 16:44:39 +08:00
}