Two ESP8266 - server and client

Hello,
I try make code, where I will send data from client to server.
But I send only " " etc.
server code

rpm = server.arg("data"); 
server.send(303);                  
server.sendHeader("Location","/"); 
Serial.println(rpm);

client

String data = rpm;
  WiFiClient client;
  const int httpPort = 80;
  //while (!client.connect(serverHost, httpPort)) {
    //Serial.println("connection failed");
  //}
  client.println("POST / HTTP/1.1");
  client.println("Host: http://192.168.1.81/rpm");
  client.println("Accept: */*");
  client.println("Content-Type: application/x-www-form-urlencoded");
  client.print("Content-Length: ");
  client.println(data.length());
  client.println();
  client.print(data);
  if (client.connected()) { 
    client.stop();  // DISCONNECT FROM THE SERVER
  }

Anyone have idea? :slight_smile:
Best regards

why http? why redirect? why connect is commented?

Juraj:
why http? why redirect? why connect is commented?

why not http? redirect I found in web. I only get connection fault.
this code have many version, sorry.
But you know how to send variable between two modules?

I start a WiFiServer for example on port 2323 on one module and connect to it with WiFiClient from the other module and then they can interchange data by write, read, print and other functions known from Serial