class HeadersConsumer {

    public void consume(Map<String, String> returnResult) {
        StringBuilder result = new StringBuilder();
        if (headers != null) {
            for (Header header : headers) {
                result.append(header.toString()).append("\r\n");
            }
            if (result.length() != 0) {
                result.delete(result.length() - 2, result.length());
            }
        }
        returnResult.put(HttpClientService.RESPONSE_HEADERS, result.toString());
    }

}