A Java library that provides structured, extensible wrappers for building API integration clients over HTTP.
http-integrations gives you a small set of well-defined abstractions — Calls, Transports, Options,
and Clients — that cover the full lifecycle of an HTTP API call: building the request body, sending
it, and parsing the response. The goal is a consistent pattern that every API client in a project
follows, so integrations are predictable, testable, and easy to extend.
| Module | Description |
|---|---|
core |
Foundation types: base exception hierarchy, the Option abstraction, and the Options utility. Compiled for Java 8+. |
http |
HTTP-specific layer built on the core module: transport implementations, client base classes, Jackson serialization support, request/response logging, and HTTP option factories. Requires Java 21. |
- Java 21 (for the
httpmodule;coretargets Java 8) - Maven (project uses Maven Wrapper —
./mvnw/mvnw.cmd)
./mvnw clean package- Implement
Call<R, C>for each API operation. - Extend
AbstractHttpIntegrationClient(orSimpleHttpIntegrationClient) as the client for the external service. - Wire a
NativeHttpTransportand pass options such as authentication headers or timeouts.
// Create a transport (connection pool enabled by default)
NativeHttpTransport transport = new NativeHttpTransport(
HttpOptions.bearerAuth("my-token"),
Options.timeout(Duration.ofSeconds(10))
);
// Instantiate the client for a specific service
MyApiClient client = new MyApiClient(transport, MyApiClient.URL_PRODUCTION);
// Execute a call
MyDomainObject result = new MyGetItemCall(itemId).execute(client);See http/src/main/java/.../example/HttpBinClient.java for a working example.