-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathstat_server.hpp
More file actions
33 lines (21 loc) · 800 Bytes
/
stat_server.hpp
File metadata and controls
33 lines (21 loc) · 800 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
33
// SPDX-FileCopyrightText: 2020-2021 Ivan Ivanov
// SPDX-License-Identifier: GPL-3.0-or-later
#define NEED_SERVER_STAT
#ifdef NEED_SERVER_STAT
#ifndef _STAT_SERVER_
#define _STAT_SERVER_
#include "WiFiClientSecure.h"
#define PORT 443
#define BOUNDARY "--------------------------133747188241686651551404"
#define TIMEOUT 20000
enum stat_type_t{
STAT_AGG_SENTORS = 0,
STAT_RAW_HR,
STAT_MAX
};
String makeHeader(String header, String uid, String token, String url, size_t length);
String makeBody(String content , String message);
bool sendStatFile(String header, String uid, String token, String date, String filename, String urlDir);
int32_t getLastDate(String header, String uid, String token);
#endif // _STAT_SERVER_
#endif // NEED_SERVER_STAT