        "Host: " + host + "\r\n" +
        "User-Agent: Chiplet\r\n" +
        "Connection: close\r\n";
+}
+
+String unquote(String s) {
+  if (s[0] == '"' && s[s.length()-1] == '"') {
+    return s.substring(1, s.length()-1);
+  }
+  return s;
 }
 
 void loop() {

  Serial.println("!I #!/dev/fail");
  Serial.print("!I token: ");
  Serial.println(cred.token);
  if (strlen(cred.ssid) > 0) {
    wifiConnect();
  }
}

bool wifiConnect() {
  Serial.print("!I connecting to wifi");
  WiFi.begin(cred.ssid, cred.password);
  for (int i = 0; i < 20; i++) {
    delay(500);
    Serial.print(".");
    if (WiFi.status() == WL_CONNECTED) {
      Serial.println("");
      Serial.print("!I wifi connected: ");
      Serial.println(WiFi.localIP());  
      return true;
    }
  }
  Serial.println("");
  Serial.println("!I wifi connection failed");
  return false;
}


  char ssid[32];
  char password[32];
} cred;
const int maxWifiConnectAttemps = 20;

String buffer;

