char buffer to String in Arduino UNO String getAPIData()
{
  char res_buffer[450];
  int numdata = inet.httpGET("myserver.com", 80, "/call.php?id=1&amp;q=1&amp;code=1001", res_buffer, 450);
  String result = String(res_buffer);
  Serial.println(result);
  Serial.println(numdata);
  return result;
}


Output on Serial: 

15:52:07.208 -&gt; 
15:52:07.208 -&gt; 393


But, When I print the buffer by loop I got the below output:

HTTP/1.1 200 OK
Date: Mon, 16 Sep 2019 06:28:59 GMT
Server: Apache
X-Powered-By: PHP/7.2.20
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Set-Cookie: PHPSESSID=5b21eeac22dcf61f2e4d2efd579d437c; path=/
Upgrade: h2,h2c
Connection: Upgrade, close
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=UTF-8

-1


I am not sure why the char buffer is not converting to String in Arduino UNO.

Any known issues ? Please suggest if any correction required.
Do not use String. And especially do not use String in the way you are using it.

You can read more about why not here.

Instead stick to just using char* buffers.

The correct way of doing what you want is to define the buffer outside your function and then pass that buffer to the function to be populated:

int getAPIData(char *buf, int maxlen) {
  return inet.httpGET("myserver.com", 80, "/call.php?id=1&amp;q=1&amp;code=1001", buf, maxlen);
}


Then you call it with:

char *my_buffer[450];
getAPIData(my_buffer, 450);
Serial.println(my_buffer);