title: with httpclient is there a way to get the character set of the page with a HEAD request?
body: <p>I'm doing a basic HEAD request using httpclient library. I'm curious how I'd be able to get the character set that apache returns E.g.: utf-8, iso-8859-1, etc...
  thanks!</p>
  
  <pre><code>  HttpParams httpParams = new BasicHttpParams();
    HttpConnectionParams.setConnectionTimeout(httpParams, 2000);
    HttpConnectionParams.setSoTimeout(httpParams, 2000);
  
    DefaultHttpClient httpclient = new DefaultHttpClient(httpParams);
    httpclient.getParams().setParameter("http.useragent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)");
  
    HttpContext localContext = new BasicHttpContext();
    httpget = new HttpHead(url); 
  
    HttpResponse response = httpclient.execute(httpget, localContext);
  
    this.sparrowResult.statusCode = response.getStatusLine().getStatusCode();
  </code></pre>
  
  <p>WORKING RESULT UPDATED</p>
  
  <pre><code>Header contentType = response.getFirstHeader("Content-Type");
  String charset= contentType.getValue();
  </code></pre>