39 lines
686 B
C++
39 lines
686 B
C++
#pragma once
|
|
|
|
#include <QMainWindow>
|
|
#include <string>
|
|
#include <zmq.hpp>
|
|
#include <nlohmann/json.hpp>
|
|
#include <sqlite3.h>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class MainWindow; }
|
|
QT_END_NAMESPACE
|
|
|
|
class HTTPData {
|
|
private:
|
|
public:
|
|
size_t index;
|
|
size_t status;
|
|
size_t ttl;
|
|
std::string method;
|
|
std::string url;
|
|
std::string request_headers;
|
|
std::string request_content;
|
|
std::string response_headers;
|
|
std::string response_content;
|
|
};
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
QThread* thread;
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
void httpMessage(HTTPData data);
|
|
};
|