Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. Feign

Feign

Apache-2.0Java13.12

A Java HTTP client binder that simplifies writing declarative HTTP API clients using annotations.

GitHubGitHub
9.8k stars1.9k forks0 contributors

What is Feign?

Feign is a Java HTTP client binder that simplifies writing HTTP API clients by using declarative annotations on Java interfaces. It processes annotations into templatized HTTP requests, reducing boilerplate code and making it easier to integrate with text-based HTTP APIs. It solves the complexity of uniformly binding Java code to various HTTP APIs, whether RESTful or SOAP-based.

Target Audience

Java developers building HTTP API clients for microservices, REST APIs, or SOAP services who want a declarative, annotation-driven approach with minimal overhead.

Value Proposition

Developers choose Feign for its simplicity, extensibility, and strong integration ecosystem—it supports various encoders/decoders, HTTP clients, and tools like Hystrix for circuit breaking, all while maintaining a clean contract-based design that is easy to unit test.

Overview

Feign makes writing java http clients easier

Use Cases

Best For

  • Building declarative HTTP clients for RESTful APIs in Java microservices
  • Integrating with JSON or XML-based web services using Gson, Jackson, or JAXB
  • Adding circuit breaker patterns to HTTP clients via Hystrix integration
  • Creating type-safe API clients with customizable error handling and retry logic
  • Developing asynchronous HTTP clients using CompletableFuture
  • Writing unit-testable HTTP client code with minimal boilerplate

Not Ideal For

  • Projects requiring real-time binary streaming or WebSocket communication
  • Teams preferring configuration-over-annotations for API client definitions
  • Applications needing immediate full RFC 6570 URI template compliance (beyond Level 1)

Pros & Cons

Pros

Declarative Interface Simplicity

Annotations like @RequestLine and @Param reduce boilerplate by templating HTTP requests directly from Java interfaces, making client code concise and readable.

Extensive Integration Ecosystem

Supports multiple encoders/decoders (Gson, Jackson, JAXB), HTTP clients (OkHttp, Ribbon), and tools like Hystrix for circuit breaking, as detailed in the integrations section.

Customizable Error Handling

Configurable error decoders and retry logic, including examples for handling 401 errors with token refresh, provide robust fault tolerance out of the box.

Asynchronous Execution Support

Offers async clients via CompletableFuture with AsyncFeign builder, allowing non-blocking HTTP calls for improved performance in concurrent applications.

Cons

Incomplete URI Template Support

The roadmap admits that full RFC 6570 level 1-4 expression support is not yet implemented, limiting advanced URI construction for complex APIs.

Breaking Changes in Development

Planned updates like Retry API refactor and async execution may involve non-backward-compatible changes, risking stability for production code.

Dependency and Version Complexity

Integrations require careful management of multiple modules (e.g., feign-form for multipart support) and version compatibility, especially with Spring Cloud.

Open Source Alternative To

Feign is an open-source alternative to the following products:

R
Retrofit

Retrofit is a type-safe HTTP client for Android and Java that turns your HTTP API into a Java interface using annotations.

Frequently Asked Questions

Quick Stats

Stars9,784
Forks1,938
Contributors0
Open Issues227
Last commit2 days ago
CreatedSince 2013

Tags

#interface#jax-rs#rest-client#java#api-client#microservices#http-client

Built With

J
Java

Included in

Java47.5k
Auto-fetched 1 day ago

Related Projects

Async Http ClientAsync Http Client

Asynchronous Http and WebSocket Client library for Java

Stars6,401
Forks1,589
Last commit8 days ago
ribbonribbon

Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. The primary usage model involves REST calls with various serialization scheme support.

Stars4,619
Forks1,235
Last commit4 months ago
unirest-javaunirest-java

Unirest in Java: Simplified, lightweight HTTP client library.

Stars2,703
Forks586
Last commit25 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub