title: Server is not acknowledging httpPost header in Android app
body: <p>I am trying to make an Android app that uses web services and I have successfully used HttpGet. I'm trying to use HttpPost now but I'm not doing one of the headers correctly. Here is my code:</p>
  
  <pre><code>//Auth token post request
  HttpPost getToken = new HttpPost(tokenURI);
  getToken.addHeader("Accept", "application/json");
  getToken.addHeader("Content-Type", "application/json");
  
  //Create token JSON request
  String jsonRequest = new JSONStringer().object().key("auth")....toString();         
  StringEntity se = new StringEntity("JSON: " + jsonRequest);
  se.setContentEncoding(new BasicHeader("Content-Type", "application/json"));
  se.setContentType("application/json");
  getToken.setEntity(se);
  </code></pre>
  
  <p>The response I am getting is this: "error":"Expecting to find application/json in Content-Type header..." and it tells me that the request is malformed or incorrect so it can't be processed.I am confused because I explicity added the header to getToken. What am I doing wrong here? Let me know if there is any more detail I can add.</p>