Questions tagged [feign]

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.

635 questions
0
votes
1 answer

Feign Ribbon client wait and retry

I am using Feign Ribbon client to talk to a service. I have a client that fails immediately after configured maxAutoRetries in ribbon. Is there a property in feign or ribbon like "wait and retry" which can wait for configured time and retry.
Pradeep
  • 850
  • 2
  • 14
  • 27
0
votes
1 answer

Authentication in microservice with feign?

I have a microservice project, I started using FeignClien in it. But there was a problem, if I authorized one service and from this service I go to another, then on the other one I also need to log in. The code for such an application can be found…
0
votes
1 answer

how to define pointcut for @FeignClient in spring project

I have simple feignclient as shown below @FeignClient(name="xxx") public interface XXXServiceClient { @RequestMapping(value = "/foo/bar", method = RequestMethod.POST) public ResponseEntity doSomething(@RequestBody XXX args); } What I…
murat karakas
  • 114
  • 2
  • 7
0
votes
1 answer

Feign Client and Spring-data-rest (HAL): Howto navigate to linked (`_links`) resorces?

finally after extensive stack-overflowing ;-) and debugging I made it work: My Feign-client can make requests on Spring-Data-Rest's API and I get a Resource with filled links back. My code so far... The FeignClient: @FeignClient(name =…
0
votes
1 answer

I'm trying to post json string using feign

I'm trying to post a json using feign but i get an error from the url that parameters were not sent. This is my code: JSONObject jsonObject = new JSONObject(); jsonObject.put("name", "Rabbit SEO"); jsonObject.put("price", "10"); …
Ron
  • 393
  • 1
  • 4
  • 13
0
votes
1 answer

Working with Spring FeignClient with fallback behavior

I got a problem to solve with Spring FeignClient. I have two endpoints to send an SMS, both are the same behavior: When I send a GET with all query parameters required, the service sends the SMS. But I need to check if endpoint A is off – in which…
0
votes
1 answer

Spring-cloud feign file upload

I am trying to upload a file with feign client in spring-boot application. I want to set encoder with the following condition: if (bodyType.equals(MultipartFile.class)){ // run multi-part logic } else { // Delegate to default encoder. } I am…
0
votes
0 answers

Feign Client prepends HTTP

I use Spring Cloud in my microservice project with Eureka and Zuul. I want to communicate between my microservices using a Feign client. Say i have a microservice Microservice1 and Microservice2. In addition, i have the Eureka microservice and the…
Leonard
  • 783
  • 3
  • 22
0
votes
1 answer

Feign not encoding param

I'm refactoring a legacy codebase to use Feign and I have some problems: No one Feign log statements are printed to console Despite instantiating with a logger and full log level Feign is not encoding my reservationSearch parameter Feign just…
fred
  • 1,812
  • 3
  • 37
  • 57
0
votes
1 answer

Fallback method is not being called when rest call is failed by using feign client

I am trying to implement fallback by using Feign client but not getting success.Its a simplest code Please find below. Main Class @SpringBootApplication @EnableDiscoveryClient @RestController @EnableFeignClients public class EurekaClient1Application…
0
votes
1 answer

Feign Client ignoring request params

I created Feign Client: @FeignClient(name = "yandex",url="${yandex.ribbon.listOfServers}") public interface YandexMapsRestApiServiceClient { @RequestMapping(method = RequestMethod.GET, value = "{geoParam}") String …
0
votes
1 answer

Inject custom feign client into Spring Application

I am currently trying to get a grip of both Spring and Feign. Cutting straight to the point: I am struggling to modify @FeignClient in this project: Feign Hello World by Walery so as to instead of WikidataClient @FeignClient(url =…
0
votes
0 answers

Feign with zookeeper succeeds with normal app but fails with JUnit

I use the zookeeper as the service register, and that's my problem: when I run it directly as a spring boot application it succeeds, instead when I use the junit to test it, it fails. The pom dependencies as as below:
0
votes
1 answer

How to add URL parameter as JSON using Feign framework?

I've made a rest client, using the feign framework, as follows: @Headers({"Content-Type: application/x-www-form-urlencoded"}) public interface CampaignTrigger { @RequestLine("POST /event?actid={actid}&key={key}&event={event}&visit={visit}") …
Robert van der Spek
  • 1,017
  • 3
  • 16
  • 37
0
votes
1 answer

Struggling to get SpringCloud Feign to work with external services

Using Feign to access services that I register on Eureka is a breeze. I am trying to use Feign to access external services and struggling with the basics. I am playing with a service on Bluemix however to simplify the problem at hand, I am using a…
Manglu
  • 10,744
  • 12
  • 44
  • 57