Popularity
2.3
Stable
Activity
0.0
Stable
30
5
7

Description

The Restler library automatically generates a client for a web service at run time, by analyzing the respective annotated Spring controller interface. Restler may help you remove HTTP-specific boilerplate from your integration tests, microservices and third-party HTTP API clients.

Programming language: Java
License: Apache License 2.0
Tags: REST Frameworks     Testing     Spring     Microservice     HTTP    
Latest version: v0.5.1

Restler alternatives and similar libraries

Based on the "REST Frameworks" category.
Alternatively, view Restler alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of Restler or a related project?

Add another 'REST Frameworks' Library

README

Build Status Maven Central

Restler

Overview

Restler is a library that automatically generates a client for a web service at run time, by analyzing the respective annotated Spring controller interface. Restler may help you remove HTTP-specific boilerplate from your integration tests, microservices and thirdparty HTTP API clients.

EPA warning: Restler currently is in early public access stage and it is neither feature complete, tested in production or backward compatible

Features

  • Easily extensible architecture
  • Custom authentication, authorization and errors mapping strategies
  • Support of form-based, http basic, cookie-based and generic header-based authentication
  • Support of async controllers through methods returning Future, DefferedResult or Callable objects
  • Experemental Spring Data REST support

Simple Usage Example

Suppose you have the following interface on the server:

/** 
  * An annotated Spring controller interface
  */
@Controller
@RequestMapping("greeter")
public interface Greeter {

    @RequestMapping("greetings/{language}") 
    String getGreeting(@PathVariable String language, @RequestParam(defaultValue = "Anonymous") String name); 

}

Then in your client you can invoke the getGreeting method of the remote service using the following code snippet:

Service service = new Restler("https://www.example.com/api", new SpringMvcSupport()).build();
Greeter greeter = service.produceClient(Greeter.class);
String greeting = greeter.getGreeting("en","Buddy"); // the result of https://www.example.com/api/greeter/greetings/en?name=Buddy call