Skip to content

Latest commit

 

History

History
72 lines (48 loc) · 1.57 KB

README.md

File metadata and controls

72 lines (48 loc) · 1.57 KB

inpaas-httpclient

HTTP Client for REST and SOAP Services

Overview

This project contains a general-purpose http-client functionality, it wraps the Apache HTTPComponents and some other libraries into a unique library for execution REST or SOAP requests.

Get it!

Maven

Functionality of this package is contained in Java package com.inpaas.http, and can be used using following Maven dependency:

<properties>
  ...
  <!-- Use the latest version whenever possible. -->
  <inpaas.httpclient.version>0.6.2</inpaas.httpclient.version>
  ...
</properties>

<dependencies>
  ...
  <dependency>
    <groupId>com.inpaas</groupId>
    <artifactId>inpaas-httpclient</artifactId>
    <version>${inpaas.httpclient.version}</version>
  </dependency>
  ...
</dependencies>

Use It!

SOAP Service

	HttpClientServiceFactory
			.getImporter(ServiceType.SOAP)
			.importService("http://www.w3schools.com/xml/tempconvert.asmx")
			.getEndpoint("FahrenheitToCelsius")
			.buildInvocation(() -> {
				Map<String, Object> data = new LinkedHashMap<>();
				data.put("Fahrenheit", 80);
				
				return data;					
			}).invoke().writeTo(System.out);
		

Release Notes

Version 0.6.6 (Current)

  • Added support for GZIP content
  • Fixed an issue with TLSv1.2

Version 0.6.2

  • Apache HTTPMime package is now available to convert XML and JSON data;
  • You can now override the responseProcessor for a single execution.

Version 0.6.1

  • Support for TLS 1.1 and 1.2 is now working properly.

Version 0.6.0

  • The header X-Agent-Host has been removed for security reasons.