code: public Response executeToResponse(HttpConnection connection) {
          InputStream is = null;
          try {
              is = this.executeToInputStream(connection);
              Response response = getResponse(is, Response.class, getGson());
              response.setStatusCode(connection.getConnection().getResponseCode());
              response.setReason(connection.getConnection().getResponseMessage());
              return response;
          } catch (IOException e) {
              throw new CouchDbException("Error retrieving response code or message.", e);
          } finally {
              close(is);
          }
      }
docs: Executes a HTTP request and parses the JSON response into a Response instance.
  
  @param connection The HTTP request to execute.
  @return Response object of the deserialized JSON response