private HttpHeaders toHttpHeaders(HttpClientResponse response) { HttpHeaders headers = new HttpHeaders(); response.responseHeaders().forEach(entry -> { String name = entry.getKey(); headers.put(name, response.responseHeaders().getAll(name)); }); return headers; }