title: How to set header in httppost/ httpget request
body: <p>i have a web service like " post -H 'Authorization: Token token="2hwhdh443hdhfh43j3jdej3j3"'. how to set this header in httpPost/ get request.</p>
  
  <p>My code is here-</p>
  
  <pre><code>HttpClient client = new DefaultHttpClient();
              HttpPost request = new HttpPost(MainActivity.baseUrl
                      + "messages");
              request.setHeader(new BasicHeader("Content-Type","application/json"));
              request.setHeader(new BasicHeader("Authorization: Token","token= 2hwhdh443hdhfh43j3jdej3j3"));
  
              response = client.execute(request);
  </code></pre>
  
  <p>but this gives HTML response. Please any one can guide me.</p>