Arduino HTTP Post request
Your problem most likely stems from this bit:

client.println("Content-Length: ");
Serial.println("After content length");

client.println(postdata.length());


You have an extraneous "ln" in there causing the post data length to be on a separate line from the Content-Length:

Content-Length:
23


You should change the first println to a print. Also the order could do with changing to keep things logically grouped:

client.print("Content-Length: ");
client.println(postdata.length());

Serial.println("After content length");


Which would result in:

Content-Length: 23