Skip to content

Pablixk/RestClient

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RestClient

Simple REST client

Example:

Initialized REST client:

public class RestClientBuilder {
    @Test
    public void testGet() {
        RestBuilder<RestClient> restBuilder = new RestBuilder(RestClient.class);
        TestRestClient testRestClient = restBuilder.build();
        String result = testRestClient.getWeather("94040", "b1b15e88fa797225412429c1c50c122a1");
        System.out.println(result);
    }
}

REST Client:

public interface RestClient {
    @Get(path = "http://samples.openweathermap.org/data/2.5/weather?zip={zip},us&appid={appid}")
    String getWeather(String zip, String appid);
}

About

Simple REST client

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages