 
   HTTP.handleClient();
   delay(1);
+  
   
   // if there's data available, read a packet
   // check if the WiFi and UDP connections were successful

 
      if(request.indexOf("<BinaryState>1</BinaryState>") > 0) {
          Serial.println("Got Turn on request");
      }

      if(request.indexOf("<BinaryState>0</BinaryState>") > 0) {
          Serial.println("Got Turn off request");
      }
      
      HTTP.send(200, "text/plain", "");

  return state;
}

void turnOnRelay() {
 digitalWrite(relayPin, HIGH); // turn on relay with voltage HIGH 
}

void turnOffRelay() {
  digitalWrite(relayPin, LOW);  // turn off relay with voltage LOW
}
