title: HTTPDefaultClient: Can't get Set-Cookie Header
body: <p>We're using Android API's and posting using HTTPDefaultClient, when we get the headers back we're not getting the "Set-Cookie" header which we need - however when we try the same URL using a raw socket we get it.</p>
  
  <p>The URL is receiving the correct information from our Android app but we just don't seem to be able to retrieve this header from it.</p>
  
  <p>Can anyone help? it's driving us potty there seems to be plenty of guides to set a cookie yourself but nothing we could find to retrieve it</p>
  
  <pre><code> try {
        HttpClient client = new DefaultHttpClient();
        DefaultHttpClient defaultClient = new DefaultHttpClient();
        HttpGet request = new HttpGet();
        request.setURI(new URI(loginUrl));
        HttpResponse response = client.execute(request);
  
        Header[] headers = response.getAllHeaders();
  
        System.out.println("-----------------------------------");
  
        for(int i = 0; i &lt; headers.length; i++) {
        Header header = headers[i];
        Log.i("HeaderName", "Header name: " + header.getName());
        Log.i("HeaderValue", "Header value: " + header.getValue());
        }
   }
   catch(Exception e) {e.printStackTrace();}
  </code></pre>