esp7758 400 bad request error

i m facing the 400 bad request error after 2 to 3 hours after running following code code..can anyone solve my issue,i m posting the string of 104 characters on url...plz look into this matter

if (medium_type == 'W')
{
client.stop();
Serial2.println(F("Wifi Connection"));
if (WiFi.status()== 1 && client.connect(server, 80))
{
timeout_req=1;
client.println("POST http://"+url2+" HTTP/1.1");
client.print("Host: ");
client.println(server);
client.println("Content-Type: application/x-www-form-urlencoded");
client.println("Connection: Close");
client.print("Content-Length: ");
client.println(usbstr.length());
client.println();
client.print(usbstr);
}

else if (WiFi.status()== 1 && !client.connect(server, 80))
{
server_http_rv=0;
timeout_req=0;
timeout_attempts++;
client.stop();
}

else if (WiFi.status()!= 1 && !client.connected())
{
server_http_rv = 0;
timeout_req=0;
timeout_attempts++;
client.stop();
digitalWrite(CONNECTIVITY_LED, LOW);
}

long timeout = millis() + 12000;
while (client.available() == 0 && timeout_req == 1)
{
if (millis() > timeout )
{
Serial2.println(F(">>Client Timeout ...."));
client.stop();
timeout_attempts++;
server_http_rv=0;
break;
}
}

while (client.available())
{
Server_Response += client.read();

  • i++;*

  • if (i == 190)*

  • { *

  • if (Server_Response[9]!= String_Search[0] && Server_Response[10]!= String_Search[1] && Server_Response[11]!= String_Search[2] )*

  • break;*

  • }*

  • }*

  • Serial2.println(Server_Response);*

  • if(strstr (Server_Response,"pinged#Yes#"))*

  • {*

  • server_http_rv=1;*

  • Serial2.println(F("pinged#Yes# Matched"));*

  • }*

  • else*

  • {*

  • server_http_rv=0;*

  • Serial2.println(F("pinged#Yes# Not Matched"));*

  • }*

  • }*

(deleted)