uint8_t web client

Hello, I am getting the result page, but I need this information in String. For use in other procedures.

Below the code commented in my need.

#include <UIPEthernet.h>

EthernetClient client;
signed long next;

void setup() {

  Serial.begin(9600);

  uint8_t mac[6] = {0x00,0x01,0x02,0x03,0x04,0x05};
  Ethernet.begin(mac);

  Serial.print("localIP: ");
  Serial.println(Ethernet.localIP());
  Serial.print("subnetMask: ");
  Serial.println(Ethernet.subnetMask());
  Serial.print("gatewayIP: ");
  Serial.println(Ethernet.gatewayIP());
  Serial.print("dnsServerIP: ");
  Serial.println(Ethernet.dnsServerIP());

  next = 0;
}

void loop() {

  if (((signed long)(millis() - next)) > 0)
    {
      next = millis() + 5000;
      Serial.println("Client connect");
      // replace hostname with name of machine running tcpserver.pl
//      if (client.connect("server.local",5000))
      if (client.connect(IPAddress(192,168,0,1),5000))
        {
          Serial.println("Client connected");
          client.println("DATA from Client");
          while(client.available()==0)
            {
              if (next - millis() < 0)
                goto close;
            }
          int size;
          while((size = client.available()) > 0)
            {
              uint8_t* msg = (uint8_t*)malloc(size);
              size = client.read(msg,size);
              Serial.write(msg,size);    //  <<<<-------- I need this result in string
              free(msg);
            }
close:
          //disconnect client
          Serial.println("Client disconnect");
          client.stop();
        }
      else
        Serial.println("Client connect failed");
    }
}

but I need this information in String. For use in other procedures.

You most certainly do NOT. Use strings (NULL terminated arrays of chars. If you have some function that insists it needs a String, delete it.

  if (((signed long)(millis() - next)) > 0)
    {
      next = millis() + 5000;

Adding time variables is not guaranteed to work. Subtraction is.

                goto close;

NEVER!. Deal with the opposite case, instead.

              Serial.write(msg,size);    //  <<<<-------- I need this result in string

It would BE a string if you used the proper type (char) and added a NULL terminator. You have the number of characters, so you know where to put the NULL.