Skip to content

Commit

Permalink
Merge pull request #2 from edenchiang/fix-support-ArunioNano33IoT
Browse files Browse the repository at this point in the history
fixed the issue of empty data for sending data with Arduino Nano 33 IoT board
  • Loading branch information
matsfunk authored Apr 9, 2021
2 parents 8529315 + f66a5db commit eeebc5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
8 changes: 6 additions & 2 deletions src/DFDataset.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/***************************************************************************
* The DataFoundry library for the ESP32 and ESP 8266 to store and retrieve
* data from ESPs on the Data Foundry platform.
* The DataFoundry library for the ESP32, ESP8266, and Arduino Nano 33 IoT
* to store and retrieve data from ESPs and Arduino Nano 33 IoT on the Data
* Foundry platform.
*
* Developed by Mathias Funk
**************************************************************************/
Expand Down Expand Up @@ -86,6 +87,7 @@ bool DFDataset::logItem() {
http.beginRequest();
http.post(address);
http.sendHeader("Content-Type", F("application/json"));
http.sendHeader("Content-Length", postMessage.length());
http.sendHeader("api_token", api_token);
http.sendHeader("source_id", device_id);
http.sendHeader("device_id", device_id);
Expand Down Expand Up @@ -142,6 +144,7 @@ bool DFDataset::addItem() {
http.beginRequest();
http.post(address);
http.sendHeader("Content-Type", F("application/json"));
http.sendHeader("Content-Length", postMessage.length());
http.sendHeader("resource_id", resource_id);
http.sendHeader("token", resource_token);
http.sendHeader("api_token", api_token);
Expand Down Expand Up @@ -198,6 +201,7 @@ bool DFDataset::updateItem() {
http.beginRequest();
http.put(address);
http.sendHeader("Content-Type", F("application/json"));
http.sendHeader("Content-Length", postMessage.length());
http.sendHeader("resource_id", resource_id);
http.sendHeader("token", resource_token);
http.sendHeader("api_token", api_token);
Expand Down
5 changes: 3 additions & 2 deletions src/DFDataset.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/***************************************************************************
* The DataFoundry library for the ESP32 and ESP8266 to store and retrieve
* data from ESPs on the Data Foundry platform.
* The DataFoundry library for the ESP32, ESP8266, and Arduino Nano 33 IoT
* to store and retrieve data from ESPs and Arduino Nano 33 IoT on the Data
* Foundry platform.
*
* Developed by Mathias Funk
**************************************************************************/
Expand Down

0 comments on commit eeebc5c

Please sign in to comment.