title: Polling data from restful webservice with "keepalive" connection
body: <p>i'm developing an android application that fetches data from a restful web service.</p>
  
  <p>i was thinking about the best way to implement this, my code is working but i'm sure it can be optimized.
  here's my current code state:
  i'm calling the restResource from a service using a scheduler. 
  the bad part is opening and closing connection on every request.
  (the rest resource keeps realtime data( i have to fetch it every second), when it's empty it returns an empty array)</p>
  
  <pre><code>        httpResponse = client.execute(request);
          responseCode = httpResponse.getStatusLine().getStatusCode();
          message = httpResponse.getStatusLine().getReasonPhrase();
  
          HttpEntity entity = httpResponse.getEntity();
  
          if (entity != null) {
  
              InputStream instream = entity.getContent();
  
              response = convertStreamToString(instream);
  
              instream.close();
          }
  </code></pre>
  
  <p>how to make use of the keepalive header returned with the response?</p>