Need Help : Ethernet Shield send analog API Function

Hello Everyone. This is my first post, I hope anybody can help me through this.

Im trying to build a code to using Ethernet Shield with Arduino Uno to send API Function to PC.
I try to do with 2 buttons and its works fine, this is my codes :

#include <SPI.h>
#include <Ethernet.h>


byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress server(192,168,1,3);  //My PC IP Address

IPAddress ip(192,168,1,30); //Ethernet Shield IP Address

const int bt1 = 2;  //My First Button
const int bt2 = 3; //My second button

;

boolean btstat = HIGH;     
boolean pllbt = HIGH; 

int led = 9;


EthernetClient client;

void setup() {

  Serial.begin(9600);
  while (!Serial) {
    ;
  }




     pinMode(bt1, INPUT); 
  digitalWrite(bt1, HIGH); 
     pinMode(bt2, INPUT); 
  digitalWrite(bt2, HIGH); 
 
   pinMode(led, OUTPUT);

  if (Ethernet.begin(mac) == 0) {
    Serial.println("Failed to get DHCP");
    
    Ethernet.begin(mac, ip);
  }

  delay(1000);
  Serial.println("connecting...");


  if (client.connect(server, 80)) {
    Serial.println("connected");
    digitalWrite(led, HIGH);

  } 
  else {

    Serial.println("Failed to Connect");
  }
}

void loop ()
{
   pllbt=btstat;
  btstat = digitalRead(bt1);


  if (btstat != pllbt)  {
    if (btstat == LOW){

      Serial.println("Select1");
      client.connect(server, 80);

      client.println("POST /API/?Function=Select1");
      client.println();
      client.stop();
     
    } 
  } 
    pllbt=btstat;
  btstat = digitalRead(bt2);


  if (btstat != pllbt)  {
    if (btstat == LOW){

      Serial.println("Select2");
      client.connect(server, 80);

      client.println("POST /API/?Function=Select2");
      client.println();
      client.stop();
     
    } 
  } 
}

my question is How to add Analog Potentiometer class to send a value ( 0 - 255) to my API software ?
Im totally new to arduino stuff, So help me please. And Thank you before

A few suggestions for you.

First, it appears you are sending a GET request, not a POST.
Second, you are not waiting for the server response, which could cause problems.
Third, you should build a character array with your request.

Something like this:

void sendRequest(char* reqString)
{
      char reqBuffer[64];

      strcpy(reqBuffer,"GET /API/?");
      strcat(reqBuffer,reqString);
      strcat(reqBuffer, " HTTP/1.1");

      client.connect(server, 80);

      client.println(reqString);
      client.print("Host: ");
      client.println(server);
      client.println("Connection: close\r\n");

      while(client.connected()) {
        while(client.available()) {
          char ch = client.read();
          Serial.write(ch);
        }
      }

      client.stop();
}
First, it appears you are sending a GET request, not a POST.
Second, you are not waiting for the server response, which could cause problems.
Third, you should build a character array with your request.

Thank you sir for your reply. And I think you're Right. I need more learning about arduino, I hope will finished it soon