Skip to content

An HTTP client built on top of the Jersey client to provide an easy-to-use API.

License

Notifications You must be signed in to change notification settings

tizianocitro/resty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Resty

An HTTP client built on top of the Jersey client to provide an easy-to-use API.

How to use

You can create a client instance as follows:

Resty resty = Resty.builder().build();

To make a request, you can access sync and async methods for each HTTP method you need. To make a GET request:

resty.get("endpoint-here",
          withHeader("your-header-name", "your-header-value"),
          withParameter("your-parameter-name", "your-parameter-value"));

To access the response and its information:

RestResponse response = resty.get(...);
if (response.isSuccess()) {
    YourClass yourClass = response.getBody(YourClass.class);
}

About

An HTTP client built on top of the Jersey client to provide an easy-to-use API.

Topics

Resources

License

Stars

Watchers

Forks

Languages