ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
try {
UrsusHttpClientConfiguration ursusHttpClientConfiguration =
mapper.readValue(open("httpClient.yml"), UrsusHttpClientConfiguration.class);
HttpClient httpClient = new UrsusHttpClientBuilder().build("example", ursusHttpClientConfiguration);
HttpResponse httpResponse = httpClient.execute(new HttpGet("http://localhost:8080/hello"));
// Convert to POJO
Hello hello = new ObjectMapper().readValue(httpResponse.getEntity().getContent(), Hello.class);
System.out.println("Name is: " + hello.getName());