Close

2019-02-16

Feign makes writing java http clients easier

Feign makes writing java http clients easier

Feign is a Java to HTTP client binder inspired by RetrofitJAXRS-2.0, and WebSocket. Feign’s first goal was reducing the complexity of binding Denominator uniformly to HTTP APIs regardless of ReSTfulness.

Why Feign and not X?

Feign uses tools like Jersey and CXF to write java clients for ReST or SOAP services. Furthermore, Feign allows you to write your own code on top of HTTP libraries such as Apache HC. Feign connects your code to HTTP APIs with minimal overhead and code via customizable decoders and error handling, which can be written to any text-based HTTP API.

How does Feign work?

Feign works by processing annotations into a templatized request. Arguments are applied to these templates in a straightforward fashion before output. Although Feign is limited to supporting text-based APIs, it dramatically simplifies system aspects such as replaying requests. Furthermore, Feign makes it easy to unit test your conversions knowing this.

Java Version Compatibility

Feign 10.x and above are built on Java 8 and should work on Java 9, 10, and 11. For those that need JDK 6 compatibility, please use Feign 9.x

Feature overview

This is a map with current key features provided by feign:

Overview of feign

Original link of this article and Feign’ s official site is https://github.com/OpenFeign/feign