class WeatherWebApi implements AutoCloseable {

    public CompletableFuture<Stream<WeatherInfo>> pastWeather(double lat, double log, LocalDate from, LocalDate to) {
        String path = HOST + String.format(PATH_PAST_WEATHER, lat, log, from, to, WEATHER_KEY);
        System.out.println(path);
        return ahc
            .prepareGet(path)
            .execute()
            .toCompletableFuture()
            .thenApply(Response::getResponseBody)
            .thenApply(body -> {
                PastWeatherDto dto = gson.fromJson(body, PastWeatherDto.class);
                return fromDtoToWeatherInfo(dto);
            });
    }

}