قکر کنم باید این طور بنویسی
while(!client.available()) delay(1);
String request = client.readStringUntil('\r');
if (request="on")
GPIO2=1;