Some updates

This commit is contained in:
2021-01-30 10:50:07 +01:00
parent dd88541135
commit eb912b8e74
13 changed files with 2765 additions and 299 deletions

View File

@ -0,0 +1,19 @@
void testClient(const char * host, uint16_t port)
{
Serial.print("\nconnecting to ");
Serial.println(host);
WiFiClient client;
if (!client.connect(host, port)) {
Serial.println("connection failed");
return;
}
client.printf("GET / HTTP/1.1\r\nHost: %s\r\n\r\n", host);
while (client.connected() && !client.available());
while (client.available()) {
Serial.write(client.read());
}
Serial.println("closing connection\n");
client.stop();
}