Feign is a java to http client binder inspired by Retrofit, JAXRS-2.0, and WebSocket. Feign's first goal was reducing the complexity of binding Denominator uniformly to http apis regardless of restfulness.
Questions tagged [feign]
635 questions
42
votes
9 answers
Feign logging not working when alter level
I'm trying to get logging working for each request from a Feign rest client.
However I cannot get the logging to work, while 'standard' Slf4j logging does work.
I have the following:
public MyClient() {
initConnectionProperties();
…

Magick
- 4,603
- 22
- 66
- 103
28
votes
7 answers
How to Integration Test spring-cloud-netflix & Feign, using WireMock
I use Spring-Cloud-Netflix for communication between micro services. Let's say I have two services, Foo and Bar, and Foo consumes one of Bar's REST endpoints. I use an interface annotated with @FeignClient:
@FeignClient
public interface BarClient {
…

Bastian Voigt
- 5,311
- 6
- 47
- 65
28
votes
9 answers
How to POST form-url-encoded data with Spring Cloud Feign
Using spring-mvc annotations:
How can I define an @FeignClient that can POST form-url-encoded?

Newbie
- 7,031
- 9
- 60
- 85
26
votes
6 answers
spring feign client exception handling
I have some fiegn client to send request other micro service.
@FeignClient(name="userservice")
public interface UserClient {
@RequestMapping(
method= RequestMethod.GET,
path = "/userlist"
)
String…

scoder
- 2,451
- 4
- 30
- 70
26
votes
6 answers
Netflix Feign - Propagate Status and Exception through Microservices
I'm using Netflix Feign to call to one operation of a Microservice A to other other operation of a Microservice B which validates a code using Spring Boot.
The operation of Microservice B throws an exception in case of the validation has been bad.…

Pau
- 14,917
- 14
- 67
- 94
22
votes
5 answers
How to set custom Jackson ObjectMapper with Spring Cloud Netflix Feign
I'm running into a scenario where I need to define a one-off @FeignClient for a third party API. In this client I'd like to use a custom Jackson ObjectMapper that differs from my @Primary one. I know it is possible to override spring's feign…

Newbie
- 7,031
- 9
- 60
- 85
20
votes
2 answers
Differences between netflix.feign & openfeign
Introduction
I recently used netflix feign along with ribbon which was quite useful.
An Example of this is:
@FeignClient(name = "ldap-proxy")
public interface LdapProxyClient {
@RequestMapping(path = "/ldap-proxy/v1/users/{userNameOrEMail}",…

Menelaos
- 23,508
- 18
- 90
- 155
20
votes
7 answers
How to ignore SSL cert trust errors in Feign?
How can I achieve curl -k in feign client?
I know I can do this. Just want to know if there's a way to ignore or disable.
new Client.Default(SSLSocketFactory sslContextFactory, HostnameVerifier hostnameVerifier)

Bee
- 12,251
- 11
- 46
- 73
20
votes
2 answers
How to add a request interceptor to a feign client?
I want every time when I make a request through feign client, to set a specific header with my authenticated user.
This is my filter from which I get the authentication and set it to the spring security…

Gustavo
- 3,461
- 7
- 26
- 41
19
votes
4 answers
Body parameters cannot be used with form parameters - Feign client with Headers and json data
I have a FeignClient like this
@RequestLine("POST /enroll")
@Headers({ "header1: {header1}", "header2: {header2}", "Content-Type: application/json" })
ResponseDto enroll(@Param("header1") String header1,@Param("header1") String header1, RequestDto…

Seetha
- 980
- 1
- 8
- 27
18
votes
2 answers
How to call url with multiple query string params in FeignClient?
I try to call Google API with multiple query string parameters. And curiously, I can't find a way to do that.
This is my FeignClient :
@FeignClient(name="googleMatrix", url="https://maps.googleapis.com/maps/api/distancematrix/json")
public…

jeremieca
- 1,156
- 2
- 13
- 38
17
votes
6 answers
Feign Client request and response and URL Logging
How I can log the payload of Feign client request, response and URL. do I have to Implement an Interceptor? Because my requirement is logging the request and response on a special table on the database.

Rami Nassar
- 303
- 1
- 4
- 13
16
votes
6 answers
@EnableFeignClients and @FeignClient fail on Autowiring 'FeignContext' NoSuchBeanException
The microservice I'm writting needs to communicate to other microservices in our platform. On that attempt, the ideal solution for us is Spring Cloud Netflix Feign, implemeting a @FeignClient.
However, I'm facing the exception below when I try an…

hudsonmendes
- 519
- 1
- 8
- 18
16
votes
3 answers
Can I throw a custom error if a hystrix-protected call times out?
I have a feign client with this external call:
@RequestMapping(method = RequestMethod.GET, value = "GetResourceA", consumes = "application/json")
@Cacheable("ResourceA")
List getResourceA() throws MyOwnException;
And in my application.yml I…

L42
- 3,052
- 4
- 28
- 49
15
votes
1 answer
What is the difference beetween max connections per route and max connections total in apache HttpClient?
I'm trying to understand what is the difference between them. I tried to read the documentation but it does not help alot.
HttpClientBuilder
.create()
.setMaxConnPerRoute(maxConnectionsPerRoute)
…

Rafael Ferreira Rocha
- 907
- 3
- 9
- 18