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
15
votes
5 answers
Feign Client does not resolve Query parameter
Here is my interface:
public interface SCIMServiceStub {
@RequestLine("GET /Users/{id}")
SCIMUser getUser(@Param("id") String id);
@RequestLine("GET /Groups?filter=displayName+Eq+{roleName}")
SCIMGroup isValidRole(@Param("roleName")…

Bee
- 12,251
- 11
- 46
- 73
13
votes
1 answer
How to send Bearer authorization token using Spring Boot and @FeignClient
I am using Spring Boot to write an application that interacts with HTTP rest servers. One of the servers I'm connecting to (Wit.ai) uses a beaerer authorization token. A curl request that yields a successful response looks like this:
GET…

Trey Bernstien
- 133
- 1
- 1
- 7
12
votes
4 answers
Spring Cloud Feign Client @RequestParam with List parameter creates a wrong request
I have a Spring Clound Feign Client mapping defined as following
@RequestMapping(method = RequestMethod.GET, value = "/search/findByIdIn")
Resources get(@RequestParam("ids") List ids);
when I…

Sergey Shcherbakov
- 4,534
- 4
- 40
- 65
11
votes
4 answers
spring-cloud-starter-openfeign: Invalid HTTP method: PATCH executing PATCH
Context
I have a spring boot (version 2.2.6.RELEASE) web project.
From this web application (I call "APP1") I want to call another URI using the PATCH method from another web application (Let's call it "APP2").
In my pom.xml, I have the following…

Kris
- 401
- 2
- 7
- 16
11
votes
1 answer
How implement Error decoder for multiple feign clients
I have multiple feign clients in a Spring Boot application. I am using a Controller Advice for handling custom exceptions for each feign client.
Here my controller advice that handles two custom exceptions (one for each client: client1 and…

YanetP1988
- 1,346
- 3
- 18
- 43
11
votes
1 answer
Feign client Retryer with a new request interceptor?
I am currently building a feign client manually and passing Interceptors to it for authorization. I would like to have a smarter Retryer for some Response code.
public class myErrorEncoder extends ErrorDecoder.Default {
@Override
public Exception…

Mik jagger
- 2,052
- 2
- 12
- 18
11
votes
4 answers
spring boot application failed to autowired feign client
I created a sample project of Spring Boot to understand the Feign client functionality, when run it gives below error.
Field remoteCallClient in com.example.demo.RestClient required a bean of type 'com.example.demo.RemoteCallClient' that could not…

Kartik Jajal
- 732
- 4
- 10
- 16
11
votes
2 answers
How to set custom Feign client connection timeout?
I have Spring Boot application with this Gradle…

Roman Cherepanov
- 1,639
- 2
- 24
- 44
10
votes
1 answer
Feign client retry on exception
So far we have a feign client which in case of exception, we used to retry as below
Retryer retryer = RetryerBuilder.newBuilder()
.retryIfExceptionOfType(FeignException.class)
…

NoobEditor
- 15,563
- 19
- 81
- 112
10
votes
1 answer
How to set a custom Feign RequestInterceptor for specific clients?
I need to add custom Authorization header to some new feign clients. So I write an RequestInterceptor and it worked but the point is I don't want this custom RequestInterceptor affect my old clients. I tried to filter using template.url() method but…

Mohammad Reza Kianifar
- 302
- 2
- 11
9
votes
1 answer
How to set custom max connection pool size in @feignclient configuration in spring
How to set custom max connection pool size in @feignclient configuration in spring ,
@FeignClient(name = "content-cms", configuration = ContentCmsServiceFeignConfig.class)
public interface FeignService {
@RequestMapping(value = "/test/", method =…

Ankush Nakaskar
- 121
- 1
- 2
- 8
9
votes
3 answers
How to Disable Ribbon and just use FeignClient in Spring Cloud
I am aware that we can force FeignClient to use OkHttp instead of Ribbon by providing the url Ex. @FeignClient(url="serviceId", name="serviceId")
I want the OkHttpClient to be used even when just the name is provided. Ex.…

Vidhyashankar Madheswaraswamy
- 159
- 1
- 2
- 10
9
votes
4 answers
How to exclude RequestInterceptor for an specific Spring Cloud Feign client?
I have a number of clients for which a "global" RequestInterceptor has been defined. For one of the clients I need this "global" interceptor to be excluded. Is it possible to override the full set of RequestInterceptors for a particular…

Newbie
- 7,031
- 9
- 60
- 85
9
votes
1 answer
Could not use POST method with Feign
im trying to write wrapper for stockfigher game api, just to learn how feign works and I have issues with very first POST method:
@RequestMapping(method = RequestMethod.POST, value = "/venues/KHEX/stocks/LMC/orders")
void newOrderForAStock(String…

hi_my_name_is
- 4,894
- 3
- 34
- 50
8
votes
4 answers
Feign multipart with Json request part
I have Feign client in one service with a method
@PostMapping(consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
MyDto uploadDocument(@RequestPart("file") MultipartFile file,
@RequestPart("myDto") String myDto);
I have…

Illia
- 151
- 1
- 7