void setup() {
Serial.begin(9600);
String code = ("GET /device=1124&code=10012&name=10012&value=1022 HTTP/1.1Host: 192.168.4.1Connection: close") ;
code.replace("GET /", "");
int index = code.indexOf("HTTP/1");
String output = code.substring(1, index-1);
Serial.println(output);
}

void loop() {
// put your main code here, to run repeatedly:
}


با اجازه من یه کم کد رو تغییر دادم