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.
21 lines
444 B
21 lines
444 B
#pragma once
|
|
|
|
#include <QCoreApplication>
|
|
#include <QtNetwork>
|
|
|
|
#include "FutureScheduler.h"
|
|
|
|
class Network : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
Network(QObject *parent = nullptr);
|
|
|
|
public:
|
|
Q_INVOKABLE void get(const QString &url, const QJSValue &callback, const QString &contentType = {}) const;
|
|
Q_INVOKABLE void getJSON(const QString &url, const QJSValue &callback) const;
|
|
|
|
private:
|
|
mutable FutureScheduler m_scheduler;
|
|
};
|