http 400?

hi folks,
i faces with a stange situtaion,

if i send to the server, i am getting http 200 and http 400,
i print out the string that i sending to the server,
it seems same,
but if i use "client.print(ln)(data) its work,

if i populate data to string and send to the server, it doesn't work,

any bug or character encoding problem or CR LF problem?
any idea?

WiFiClient clientİ
do client connect stuff ....

/* GOOD ONE /
String jsonStr = "some data";
client.println("PUT /uploaddata HTTP/1.1");
client.print("Host: ");
client.println(hostdnsIOT);
client.println("Content-Type: application/json");
client.print("Content-Length: ");
client.println(jsonStr.length());
client.println("");
client.println(jsonStr);
/

/* AH00566: request failed: malformed request line /
/
get http 400
String httpData = "PUT /uploaddata HTTP/1.1\n";
httpData += "Host: " + hostdnsIOT + "\n";
httpData += "myhost: " + hostdnsIOT + "\n";
httpData += "Content-Type: application/json\n";
httpData += "Content-Length: " + String(jsonStr.length());
httpData += "\n\n";
httpData += jsonStr;
Serial.println("Elastic data :" + httpData);
client.print(httpData);
*/

use

\r\n

hi,

i used \n\r :frowning: i confused, sorry for thread, its ok now, thanks.