feat: Add Test for Connect API

This commit is contained in:
Mathis
2023-04-24 14:54:26 +02:00
parent 5784e38fbb
commit 36bdb86343
5 changed files with 39 additions and 6 deletions

View File

@ -59,7 +59,8 @@ bool API::connect(){
this->client->println();
while (!client->available()) {}
while (!client->available()) {
}
String responce = "";
while (client->available()) {
@ -77,7 +78,10 @@ bool API::connect(){
this->client->stop();
sortie = true;
if (JSONVar::stringify(JSONVar::parse(str)["code"]) == "400") {
Serial.println("Failed to authenticate");
return false;
}
return sortie;
}