 #ifdef USE_NETWORK
 bool networkRequestIP(IPAddress ip, String url)
 {
+  if (client.connected())
+  {
+    client.stop();
+  }
+  
   if (client.connect(ip, 80))
   {
-    String request = "GET "+url;
-    request += " HTTP/1.1\r\nConnection: close\r\n\r\n";
-    request.toCharArray(requestBuffer, 96);
+    Serial.println("[network] sending request");
+
+    client.print("GET ");
+    client.print(url);
+    client.println(" HTTP/1.0");
+    client.println("Connection: close");
+    client.println();
     
-    Serial.println("[network] sending request:");
-    client.write(requestBuffer);
-    client.stop();
     return true;
   } else
   {

#ifdef USE_WIFI_SHIELD
  #define USE_NETWORK
  WiFiClient client;
  WiFiServer server = WiFiServer(SERVER_PORT);
  WiFiUDP udp;
  int connectionStatus = WL_IDLE_STATUS;
#endif

#ifdef USE_NETWORK
  char requestBuffer[96];
#endif

#ifdef USE_STROMBEWUSST_SERVER

void networkConnect();
void wifiConnect();
void ethernetConnect();

void serverCheck();
void networkCheck();

String serverHeader(String);
bool networkRequestIP(IPAddress, String);

