This repository has been archived on 2024-10-30. You can view files and clone it, but cannot push or open issues or pull requests.
esp-firewall/SourceCode/arduino/lib/Firewall/esp32FirewallAPI.hpp
2022-04-20 07:58:06 +02:00

29 lines
716 B
C++

#ifndef ESP32_FIREWALL_API_HPP
#define ESP32_FIREWALL_API_HPP
#include "HTTPSServer.hpp"
#include "SSLCert.hpp"
#include "HTTPRequest.hpp"
#include "HTTPResponse.hpp"
#include "ArduinoJson.h"
using namespace httpsserver;
class esp32FirewallApi
{
HTTPSServer *server;
SSLCert *certificate;
void setup_certificate();
void setup_routing();
void restart_device_handler(HTTPRequest *, HTTPResponse *);
void not_found_handler(HTTPRequest *, HTTPResponse *);
public:
esp32FirewallApi(const uint16_t = 8080);
void handle_clients();
void json_generic_response(HTTPResponse *, String, const uint16_t);
void json_message_response(HTTPResponse *, String, const uint16_t);
};
#endif