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.
31 lines
557 B
31 lines
557 B
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QList>
|
|
|
|
class HttpClient;
|
|
|
|
/// @Brief Http¹ÜÀí
|
|
/// @Note ·ÇḬ̈߳²È«
|
|
class XHttpManager : public QObject {
|
|
Q_OBJECT;
|
|
|
|
XHttpManager();
|
|
public:
|
|
~XHttpManager();
|
|
|
|
static XHttpManager& getInstance();
|
|
|
|
bool getByHttp(const char* id, const char* baseUrl, const char* token, const char* params);
|
|
bool postByHttp(const char* id, const char* baseUrl, const char* token, const char* jsonData);
|
|
|
|
void release();
|
|
|
|
private:
|
|
HttpClient* getIdle();
|
|
|
|
private:
|
|
static XHttpManager instance;
|
|
|
|
QList<HttpClient*> clients;
|
|
}; |