-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp.h
More file actions
33 lines (24 loc) · 665 Bytes
/
http.h
File metadata and controls
33 lines (24 loc) · 665 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include "ArduinoJson/Array/JsonArray.hpp"
#include <ESP8266WebServer.h>
#include <ArduinoJson.h>
class HttpServer {
public:
HttpServer();
void loop();
void init();
private:
ESP8266WebServer* server;
StaticJsonDocument<1024> responseMessage;
StaticJsonDocument<1024> requestJSON;
void sendResponse(String, int);
void sendHTMLResponse(String, int);
void sendJSONResponse();
void handleJSONAction();
void setLightCountAction(int);
void setColorsAction(JsonArray, bool);
void setModeAction(int);
void setBrightnessAction(int);
void setIsEnabledAction(bool);
};
HttpServer* getHttpServer();
extern HttpServer* httpServer;