How to set http header to sending json object from our android apps what type of header we want to use for sending data from client side to server.why we ar
you can use
try {
HttpClient client = new DefaultHttpClient();
String getURL = "http://helloworld.com/getmethod.aspx?id=1&method=getData";
HttpGet httpGet = new HttpGet(getURL);
**httpGet .setHeader("Content-Type", "application/x-zip");**
HttpResponse response = client.execute(httpGet);
HttpEntity resEntity = response.getEntity();
if (resEntity != null) {
//parse response.
Log.e("Response",EntityUtils.toString(resEntity));
}
} catch (Exception e) {
e.printStackTrace();
}