Cosmic Module
O
Qubits of DPK
March 23, 2026
Core Open Source
What This Module Is (Big Picture)
The client-feign module provides a declarative REST client for Apache Fineract using OpenFeign.
Instead of manually writing HTTP request logic, developers define Java interfaces, and Feign automatically generates the HTTP calls.
This module simplifies integration by:
- mapping Java methods to REST endpoints
- automatically handling HTTP communication
- serializing and deserializing JSON
It acts as a runtime implementation of the client module APIs.
Layman Example
Without Feign:
A developer must manually write HTTP requests.
Example:
plain text
QUBITS OF DPK
And manually handle JSON responses.
With fineract-client-feign:
The developer simply calls a Java method.
Example:
plain text
QUBITS OF DPK
Feign automatically:
- sends the HTTP request
- converts the request to JSON
- receives the response
- converts JSON back to Java objects
Where the Code Lives
Key Package
org.apache.fineract.client.feign
Responsibilities include:
- implementing API clients using Feign
- configuring HTTP communication
- managing request interceptors
- handling authentication headers
Feign Client Interface
Feign clients map Java methods to REST endpoints.
Example client interface.
java
QUBITS OF DPK
Feign automatically converts this interface into HTTP requests.
Example Feign Client Usage
An application can call the API like this:
java
QUBITS OF DPK
Feign handles the HTTP request internally.
Request Interceptors
Feign clients use interceptors to add headers to requests.
Example: authentication header.
java
QUBITS OF DPK
This ensures every request includes authentication information.
Feign Configuration
The module includes configuration for:
- base URL
- authentication headers
- JSON serialization
- request timeouts
These settings ensure reliable communication with the Fineract server.
API Communication Flow
java
QUBITS OF DPK
Error Handling
Feign automatically converts HTTP errors into exceptions.
Example:
This allows applications to handle errors programmatically.
Why This Module Matters
The Feign client module allows developers to:
- integrate with Fineract easily
- avoid writing manual HTTP code
- use declarative API clients
It greatly simplifies microservice and external application integrations.
One-Sentence Summary
fineract-client-feign provides a Feign-based declarative REST client implementation that allows external applications to interact with Apache Fineract APIs easily.