Skip to content

Commit 6695d1f

Browse files
committed
update codes, fix BLINKER STORAGE HTTPS codes.
1 parent b089f46 commit 6695d1f

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

src/Blinker/BlinkerApi.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,9 +1560,9 @@ class BlinkerApi : public BlinkerProtocol
15601560

15611561
url_iot = BLINKER_F("/api/v1/storage/ts ");
15621562
#ifndef BLINKER_WITHOUT_SSL
1563-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
1563+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
15641564
#else
1565-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
1565+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
15661566
#endif
15671567
// http.addHeader(conType, application);
15681568
httpCode = http.POST(msg, conType, application);
@@ -1579,9 +1579,9 @@ class BlinkerApi : public BlinkerProtocol
15791579

15801580
url_iot = BLINKER_F("/api/v1/storage/text ");
15811581
#ifndef BLINKER_WITHOUT_SSL
1582-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
1582+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
15831583
#else
1584-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
1584+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
15851585
#endif
15861586
// http.addHeader(conType, application);
15871587
httpCode = http.POST(msg, conType, application);
@@ -2227,29 +2227,29 @@ class BlinkerApi : public BlinkerProtocol
22272227
case BLINKER_CMD_TIME_SLOT_DATA_NUMBER :
22282228
url_iot = BLINKER_F("/api/v1/storage/ts");
22292229
#ifndef BLINKER_WITHOUT_SSL
2230-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2230+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22312231
#else
2232-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2232+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22332233
#endif
22342234
// http.addHeader(conType, application);
22352235
httpCode = http.POST(msg, conType, application);
22362236
break;
22372237
case BLINKER_CMD_TEXT_DATA_NUMBER :
22382238
url_iot = BLINKER_F("/api/v1/storage/text");
22392239
#ifndef BLINKER_WITHOUT_SSL
2240-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2240+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22412241
#else
2242-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2242+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22432243
#endif
22442244
// http.addHeader(conType, application);
22452245
httpCode = http.POST(msg, conType, application);
22462246
break;
22472247
case BLINKER_CMD_JSON_DATA_NUMBER :
22482248
url_iot = BLINKER_F("/api/v1/storage/object");
22492249
#ifndef BLINKER_WITHOUT_SSL
2250-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2250+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22512251
#else
2252-
http.begin(BLINKER_STORAGE_HTTP, url_iot);
2252+
http.begin(BLINKER_STORAGE_HTTPS, url_iot);
22532253
#endif
22542254
// http.addHeader(conType, application);
22552255
httpCode = http.POST(msg, conType, application);
@@ -12183,10 +12183,10 @@ char * BlinkerApi::widgetName_tab(uint8_t num)
1218312183
case BLINKER_CMD_TIME_SLOT_DATA_NUMBER :
1218412184
// url_iot = host;
1218512185
#ifndef BLINKER_WITHOUT_SSL
12186-
url_iot = BLINKER_STORAGE_HTTP;
12186+
url_iot = BLINKER_STORAGE_HTTPS;
1218712187
url_iot += BLINKER_F("/api/v1/storage/ts");
1218812188
#else
12189-
url_iot = BLINKER_STORAGE_HTTP;
12189+
url_iot = BLINKER_STORAGE_HTTPS;
1219012190
url_iot += BLINKER_F("/api/v1/storage/ts");
1219112191
#endif
1219212192

@@ -12210,10 +12210,10 @@ char * BlinkerApi::widgetName_tab(uint8_t num)
1221012210
case BLINKER_CMD_TEXT_DATA_NUMBER :
1221112211
// url_iot = host;
1221212212
#ifndef BLINKER_WITHOUT_SSL
12213-
url_iot = BLINKER_STORAGE_HTTP;
12213+
url_iot = BLINKER_STORAGE_HTTPS;
1221412214
url_iot += BLINKER_F("/api/v1/storage/tt");
1221512215
#else
12216-
url_iot = BLINKER_STORAGE_HTTP;
12216+
url_iot = BLINKER_STORAGE_HTTPS;
1221712217
url_iot += BLINKER_F("/api/v1/storage/tt");
1221812218
#endif
1221912219

@@ -12233,10 +12233,10 @@ char * BlinkerApi::widgetName_tab(uint8_t num)
1223312233
case BLINKER_CMD_JSON_DATA_NUMBER :
1223412234
// url_iot = host;
1223512235
#ifndef BLINKER_WITHOUT_SSL
12236-
url_iot = BLINKER_STORAGE_HTTP;
12236+
url_iot = BLINKER_STORAGE_HTTPS;
1223712237
url_iot += BLINKER_F("/api/v1/storage/ot");
1223812238
#else
12239-
url_iot = BLINKER_STORAGE_HTTP;
12239+
url_iot = BLINKER_STORAGE_HTTPS;
1224012240
url_iot += BLINKER_F("/api/v1/storage/ot");
1224112241
#endif
1224212242

src/Server/BlinkerServer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
#define BLINKER_SERVER_HOST "iot.diandeng.tech"
1414
#endif
1515

16-
#ifndef BLINKER_STORAGE_HTTP
16+
#ifndef BLINKER_STORAGE_HTTPS
1717
#ifndef BLINKER_WITHOUT_SSL
18-
#define BLINKER_STORAGE_HTTP "https://storage.diandeng.tech"
18+
#define BLINKER_STORAGE_HTTPS "https://storage.diandeng.tech"
1919
#else
20-
#define BLINKER_STORAGE_HTTP "http://storage.diandeng.tech"
20+
#define BLINKER_STORAGE_HTTPS "http://storage.diandeng.tech"
2121
#endif
2222
#endif
2323

0 commit comments

Comments
 (0)