Questions tagged [spring-cloud-feign]

Use this tag for question related to the use of Feign declarative REST client inside the spring cloud ecosystem.

Feign declarative REST client used inside the spring cloud ecosystem.

734 questions
0
votes
0 answers

how to decode error code in spring boot fiegn client

I have to implement a error decode for feign client I went to through this link in that, decode function needs response but how to get this response from fiegn client, below is my feign client. @FeignClient(name="userservice") public interface…
scoder
  • 2,451
  • 4
  • 30
  • 70
0
votes
1 answer

netflix feign issue with query parameters

I am using feign client for some discovery and request. I am using query parameter in my request if I hard code like below it works. @FeignClient("userdetailservice") public interface UserServiceClient { @RequestMapping( method=…
scoder
  • 2,451
  • 4
  • 30
  • 70
0
votes
2 answers

Spring Autowiring error: java.lang.IllegalStateException: Method [name] can only contain 1 method field. Found: [PUT, POST]

I have a method in one of my webservices that accepts both PUT and POST. This is because we started using PUT but later we needed to support POST too (for a new service). @RequestMapping( value = "/endpointURL", method =…
slayers_88
  • 63
  • 5
0
votes
1 answer

How to use custom ApacheHttpClient with Feign?

I've tried to add a custom HttpClient via configuration: @Bean public CloseableHttpClient httpClient() { RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(15000) …
Manish Mishra
  • 12,163
  • 5
  • 35
  • 59
0
votes
1 answer

How to link Feign Clients Object to spesific response key

I am creating a REST API to call another API using Feign Client on Spring Boot. The JSON response that is produced isn't exact same with my Models. Here's what I got: { "success": true, "data": [ { "id": 1, "name": "DC-01", …
Williams Perdana
  • 169
  • 1
  • 3
  • 16
0
votes
0 answers

Aborting http request sent via Feign client

Is there any way to cancel an http request sent via feign client? I thought of intercepting the requests to store them somewhere so I can abort them if needed but there no such method provided by "Request" class. I want to abort file download.
ortashe
  • 1
  • 1
  • 4
0
votes
1 answer

feign.RetryableException: Read timed out executing GET http://forex-service/currency-exchange/from/EUR/to/INR\r\n\tat feign.FeignException.errorExecu

I am following microservices code from : http://www.springboottutorial.com/microservices-with-spring-boot-part-5-eureka-naming-server and using latest version of Spring Boot and Spring Cloud as of now is 2.1.2.RELEASE and Greenwich.RC2. When I hit…
PAA
  • 1
  • 46
  • 174
  • 282
0
votes
1 answer

Why Eclipse cannot recognize Feign dependency?

I have this pom: org.springframework.cloud spring-cloud-starter-feign 1.4.6.RELEASE org.springframework.cloud
rado
  • 5,720
  • 5
  • 29
  • 51
0
votes
1 answer

Feign client mocking in in Junit implementation

I have been trying to mock the feign client call from Services in a spring boot implementation for writing the Junit test cases. //Service code @Autowired private PersonClient personClient; //Using the personClient public Person someMethod(){ …
freaksterz
  • 83
  • 3
  • 9
0
votes
0 answers

FeignClient API-Call with application/x-www-form-urlencoded HEADER

i try to call an azure-api to get a access-token. With postman this work verry well. Now i'am trying to do it with spring boot and feign client. The Azure-Api-Call need a application/x-www-form-urlencoded header. On the internet I found out that a…
0
votes
2 answers

Double the URL when using Feign with Spring boot

I am little new to Spring boot and I am using Feign Rest client to talk to my web service. But I'm getting my URL double and cannot invoke the intended service. @FeignClient(name= "exchange-service", url="localhost:8000") public interface…
Kepler
  • 399
  • 1
  • 7
  • 19
0
votes
2 answers

How to modify the parameter name of MultipartFile in uploading?

I need to upload a MultipartFile to a third-party service via my own backend service. The parameter in the multipart form is 'nameA' but the third-party service need its param name is 'nameB'. Normally I can solve it in two ways: Change the param…
Sid
  • 31
  • 4
0
votes
1 answer

Do I need to close Response.body for Custom Error Handling in Feign Client

I have defined custom ErrorDecoder for Feign Client with reference to this wiki page. In my ErrorDecoder I am reading response body by invoking response.body() Do I need to close response in my ErrorDecoder when reading InputStream. Or Feign will…
0
votes
2 answers

How can I get the elapsed time from a feign client request?

I am using Spring Feign clients. Is there a way to get the time it took for a response to be received after a request was sent? I have a lot of requests mapped and would like a clean way to assert in tests that a response was received within a…
Jusbat
  • 40
  • 5
0
votes
1 answer

Feign Oauth2 client token exception

I m trying to get feign Client to work over my Oauth2 SSO I have defined a bean interceptor as below @Bean @LoadBalanced RequestInterceptor oauthFeignClient(OAuth2ClientContext oauth2ClientContext, OAuth2ProtectedResourceDetails…