Skip to content
Snippets Groups Projects
Verified Commit cf7fd22f authored by Zoe Michaela Dietmar Pfister's avatar Zoe Michaela Dietmar Pfister :gay_pride_flag:
Browse files

WIP: Refactor

parent 08edd213
No related branches found
No related tags found
4 merge requests!39Merge Develop into Main,!19development into master,!17Inital Host, initial Client,!14Merge gsm host into development
...@@ -26,7 +26,7 @@ static const std::string TAG_GSM = "GSM"; ...@@ -26,7 +26,7 @@ static const std::string TAG_GSM = "GSM";
#define SerialAT Serial1 #define SerialAT Serial1
// See all AT commands, if wanted // See all AT commands, if wanted
// #define DUMP_AT_COMMANDS #define DUMP_AT_COMMANDS
// set GSM PIN, if any // set GSM PIN, if any
#define GSM_PIN "" #define GSM_PIN ""
...@@ -406,16 +406,13 @@ void loop() ...@@ -406,16 +406,13 @@ void loop()
client.println("Host: " + url); client.println("Host: " + url);
// authorization // authorization
client.println("Authorization: Token " + token); client.println("Authorization: Token " + token);
// json data // line data
client.println("Content-Type: text/plain"); client.println("Content-Type: text/plain");
client.println("Accept: application/json");
// data length // data length
client.println("Content-Length: " + String(lineData.length())); client.println("Content-Length: " + String(lineData.length()));
client.println(); client.println();
client.println(lineData); client.println(lineData);
client.println("Connection: close");
client.println();
// print response // print response
while (client.connected()) { while (client.connected()) {
String line = client.readStringUntil('\n'); String line = client.readStringUntil('\n');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment