Package com.aceevo.ursus.client

Examples of com.aceevo.ursus.client.UrsusHttpClientBuilder


        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());
View Full Code Here


        ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        try {
            UrsusHttpClientConfiguration ursusHttpClientConfiguration =
                    mapper.readValue(open(configFile), 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());
View Full Code Here

TOP

Related Classes of com.aceevo.ursus.client.UrsusHttpClientBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.