restler

Restler is a library that generates a client of a web service by its annotated Spring controller interface at runtime.

License

License

GroupId

GroupId

org.restler
ArtifactId

ArtifactId

restler
Last Version

Last Version

0.5.1
Release Date

Release Date

Type

Type

pom
Description

Description

restler
Restler is a library that generates a client of a web service by its annotated Spring controller interface at runtime.
Source Code Management

Source Code Management

https://github.com/excelsior-oss/restler

Download restler

Filename Size
restler-0.5.1.pom 9 KB
Browse

How to add to project

<!-- https://jarcasting.com/artifacts/org.restler/restler/ -->
<dependency>
    <groupId>org.restler</groupId>
    <artifactId>restler</artifactId>
    <version>0.5.1</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.restler/restler/
implementation 'org.restler:restler:0.5.1'
// https://jarcasting.com/artifacts/org.restler/restler/
implementation ("org.restler:restler:0.5.1")
'org.restler:restler:pom:0.5.1'
<dependency org="org.restler" name="restler" rev="0.5.1">
  <artifact name="restler" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.restler', module='restler', version='0.5.1')
)
libraryDependencies += "org.restler" % "restler" % "0.5.1"
[org.restler/restler "0.5.1"]

Dependencies

compile (3)

Group / Artifact Type Version
cglib : cglib-nodep jar 3.1
org.objenesis : objenesis jar 2.1
org.slf4j : slf4j-api jar 1.7.5

test (3)

Group / Artifact Type Version
org.codehaus.groovy.maven.runtime : gmaven-runtime-api jar 1.0
org.codehaus.groovy : groovy-all jar 2.4.3
org.spockframework : spock-core jar 1.0-groovy-2.4

Project Modules

There are no modules declared in this project.

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
org.restler

Excelsior LLC

We make Excelsior JET, a compliant Java SE JVM with AOT compiler. These are our open source projects.

Versions

Version
0.5.1
0.5.0
0.4.2
0.4.1
0.4.0
0.3.1
0.3.0
0.2.0
0.1.1
0.1.0