25 lines
496 B
C++
25 lines
496 B
C++
//
|
|
// Created by wuyiz on 2023/6/19.
|
|
//
|
|
|
|
#ifndef AICSKNOWLEDGEBASE_HTTPCLIENT_H
|
|
#define AICSKNOWLEDGEBASE_HTTPCLIENT_H
|
|
|
|
#include <curl/curl.h>
|
|
#include <QObject>
|
|
#include <QQmlApplicationEngine>
|
|
|
|
class HttpClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HttpClient(QQmlApplicationEngine &engine, QObject *parent = nullptr);
|
|
Q_INVOKABLE void doGetRequest(QString url, QObject* object, QString callback);
|
|
|
|
private:
|
|
QQmlApplicationEngine &engine;
|
|
};
|
|
|
|
|
|
#endif //AICSKNOWLEDGEBASE_HTTPCLIENT_H
|