hi, from my android client i am sending a json to string object.but the .net client is getting it as empty string. here is my code.
HttpPost request = new HttpPost(SERVICE_URI+"/save");
JSONStringer json = new JSONStringer()
.object()
.key("cno").value("2000")
.key("cname").value("HI")
.key("cmail").value("HI")
.key("cphno").value("9292")
.key("cmailtype").value("Home")
.key("cphnotype").value("Office")
.key("clientno").value("1")
.endObject();
String a= json.toString();
StringEntity entity = new StringEntity(a);
entity.setContentType("text/plain;charset=UTF-8");
entity.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE,"text/plain;charset=UTF-8"));
request.setEntity(entity);
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpResponse response = httpClient.execute(request);
is this header format correct?