TypedRest

TypedRest helps you build type-safe fluent-style REST API clients.

License

License

GroupId

GroupId

com.oneandone
ArtifactId

ArtifactId

typedrest
Last Version

Last Version

0.7
Release Date

Release Date

Type

Type

jar
Description

Description

TypedRest
TypedRest helps you build type-safe fluent-style REST API clients.

Download typedrest

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
org.codehaus.jackson : jackson-core-lgpl jar 1.9.13
org.codehaus.jackson : jackson-mapper-lgpl jar 1.9.13
org.apache.httpcomponents : fluent-hc jar 4.5
io.reactivex : rxjava jar 1.0.14
io.reactivex : rxjava-async-util jar 0.21.0
org.hibernate.javax.persistence : hibernate-jpa-2.1-api jar 1.0.0.Final

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.16.6

test (3)

Group / Artifact Type Version
com.github.tomakehurst : wiremock jar 1.57
junit : junit jar 4.12
org.hamcrest : hamcrest-all jar 1.3

Project Modules

There are no modules declared in this project.

TypedRest for Java

TypedRest for Java helps you build type-safe, fluent-style REST API clients. Common REST patterns such as collections are represented as classes, allowing you to write more idiomatic code.

MyClient client = new MyClient(URI.create("http://example.com/"));

// GET /contacts
List<Contact> contactList = client.getContacts().readAll();

// POST /contacts -> Location: /contacts/1337
ContactEndpoint smith = client.getContacts().create(new Contact("Smith"));
//ContactEndpoint smith = client.getContacts().get("1337");

// GET /contacts/1337
Contact contact = smith.read();

// PUT /contacts/1337/note
smith.getNote().set(new Note("some note"));

// GET /contacts/1337/note
Note note = smith.getNote().read();

// DELETE /contacts/1337
smith.delete();

Read an Introduction to TypedRest or jump right in with the Getting started guide.

For information about specific Java classes or interfaces you can read the API Documentation.

Maven artifacts

Artifact group: com.oneandone

typedrest-core
The main TypedRest library.

typedrest-annotations
Annotations for data models to be used with TypedRest.

typedrest-vaadin
Build Vaadin GUIs for TypedRest clients.

typedrest-archetype
Maven archetype (template) for creating TypedRest projects.

com.oneandone

1&1

Open Source by 1&1 Group.

Versions

Version
0.7
0.6
0.5
0.4
0.3