tisana4j

Yet another (but missing) simple RESTful client library for Java.

License

License

GroupId

GroupId

com.cloudesire
ArtifactId

ArtifactId

tisana4j
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

tisana4j
Yet another (but missing) simple RESTful client library for Java.
Project URL

Project URL

https://github.com/ClouDesire/tisana4j
Source Code Management

Source Code Management

https://github.com/ClouDesire/tisana4j

Download tisana4j

How to add to project

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

Dependencies

compile (6)

Group / Artifact Type Version
com.fasterxml.jackson.core : jackson-databind jar 2.4.1
org.apache.httpcomponents : httpclient jar 4.4.1
org.apache.httpcomponents : httpmime jar 4.4.1
org.codehaus.woodstox : woodstox-core-asl jar 4.2.0
org.slf4j : slf4j-api jar 1.7.5
org.apache.commons : commons-io jar 1.3.2

test (8)

Group / Artifact Type Version
org.apache.httpcomponents : httpclient jar 4.4.1
org.apache.httpcomponents : httpclient jar 4.4.1
junit : junit jar 4.8.1
org.assertj : assertj-core jar 2.4.1
org.slf4j : log4j-over-slf4j jar 1.7.5
org.slf4j : jcl-over-slf4j jar 1.7.5
ch.qos.logback : logback-classic jar 1.0.13
com.squareup.okhttp : mockwebserver jar 2.3.0

Project Modules

There are no modules declared in this project.

tisana4j

CircleCI Requirements Status maven latest release

Yet another (but missing for us) simple RESTful client Java library, that support both JSON and XML REST API, based on the great Apache HttpClient.

We begun writing this library when coding the first integration tests for ClouDesire backend.

Nowadays there are a lot of alternatives, like OkHttp, Unirest, but we are still in love with this.

Features

  • Internally use Apache HttpClient
  • Support for GET, POST, PUT, PATCH, DELETE methods
  • Standard java.net.URL to supply request URL and GET parameters
  • De/Serilization of Request/Response bodies via supplied .class (via Jackson and JAXB)
  • Errors always mapped to a RestException hierarchy
  • Ability to define a custom ExceptionTranslator to map your Exceptions or custom error handling

Usage

<dependency>
    <groupId>com.cloudesire</groupId>
    <artifactId>tisana4j</artifactId>
    <version>0.0.24</version>
</dependency>

Example

More examples in the integration tests package.

public class Test {
	private static class NetworkAddress {
		private String ip;

		public String getIp() {
			return ip;
		}

		public void setIp(String ip) {
			this.ip = ip;
		}
	}

	public static void main(String[] args) throws Exception {
		// default Client: no credentials
		RestClient client = new RestClient();
		NetworkAddress testClass = client.get(new URL("http://ip.jsontest.com/"), NetworkAddress.class);

		System.out.println("YOUR IP:" + testClass.getIp());
	}
}
com.cloudesire

cloudesire

The cloud platform of Engineering Ingegneria Informatica S.p.A.

Versions

Version
1.0.0
0.0.31
0.0.30
0.0.29
0.0.28
0.0.27
0.0.26
0.0.25
0.0.24
0.0.23
0.0.22
0.0.21
0.0.20
0.0.16
0.0.14
0.0.12
0.0.11
0.0.10