I hope is better
A little. The only argument for putting the { on the same line as the statement that it goes with that holds any water is that it saves a line. Following that up with two blank lines is not a good idea.
Get rid of the excessive blank lines.
You still have a while(client.connected()) block inside a while(client.connected()) block. ONLY have one!
Get rid of the first three of these lines:
while (client.connected()) {
if (client.available()) {
char c = client.read();
Serial.write(c);
(and the matching }s at the bottom).
if (c == '\n' && currentLineIsBlank) {
This indicates that reading of the client's request is complete. At this point, you should do something based on what the client asked for. "GET /" and "GET /?Torsion1=22" may need to result in different output. Or, they may not. You need to decide that.
if(readString.indexOf("Tension1") >0)
{
Serial.println("Tension 1 lue");
int pos = readString.indexOf("Tension1");
Serial.println(pos);
}
Move the int pos statement before the if statement. Change the if statement to if(pos > 0).
The substring of interest is the part after the single =, so locate the equal sign.
int equalPos = readString.indexOf("=");
Then, create a substring from the next character to the end of the string:
String crap = readString.substring(equalPos);
Then, extract the string that is wrapped in the String:
char goodStuff[10];
crap.toCharArray(goodStuff, 10);
Then, convert the good stuff to an int or a float, as appropriate, using atoi(goodStuff) or atof(goodStuff).