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
3
votes
0 answers

Converting request body error while using Feign to process incoming httpServletRequest

There are two modules in my project and I wanna get an httpServletRequest in the web module and send it to the core module by using feign in order to do some process on this request in the core module. Here are the steps respectively: web module…
siaVash
  • 31
  • 1
  • 4
3
votes
2 answers

Feign Client Signed Endpoint

I am using Spring Feign Client to access Binance API. Certain APIs such as SIGNED Endpoint Examples for POST /api/v3/order require to be signed using -sha256 -hmac. The documentation tells how do call the signed API using cURL + OpenSSL Example 1:…
Flavio Oliva
  • 401
  • 4
  • 15
3
votes
1 answer

Multiple Feign client timeout configurations

If you prefer using configuration properties to configured all @FeignClient, you can create configuration properties with default feign name. It's also possible to set these timeouts per specific client by naming the client. And, we could, of…
Naty S.
  • 31
  • 1
  • 2
3
votes
0 answers

Setting cookies in Feign client

I have a rest endpoint (Application A) which is getting called from UI and ServletRequest from UI has all the cookies. From application A, I am calling Application B through FeignClient. How can I pass all the cookies to application B using Feign?
3
votes
2 answers

FeignClient create POST with application/x-www-form-urlencoded body

I am trying to make a POST request to a keycloak REST API endpoint with a body with application/x-www-form-urlencoded values. Here is a cURL of a request: curl -X POST \ …
MBozic
  • 1,132
  • 1
  • 10
  • 22
3
votes
1 answer

Feign client response validation

I have two applications A and B communicating with each other using FeignClient. As an application A I want to have validation on the data that is returned by application B. If I want to validate request parameters I can easily use @Valid annotation…
andziaa133
  • 63
  • 1
  • 7
3
votes
1 answer

feign client - retrieving jwt token from a service and setting it automatically in feign client

I'm using feign client to call other services. Service A need to contact Service B and has to be authenticated via authentication service. If I wasn't using feign, I would just use resttemplate calling first the authentication service.. get the…
nadavgam
  • 2,014
  • 5
  • 20
  • 48
3
votes
2 answers

Can we throw an exception in fallback or fallbackFactory of @FeignClient

I'm use the @FeignClient and want to do some logic(like record the exception information) when Feign throw Exception and then reply the result to front end. I noticed Feign will throw FeignException when connection fail or http status not expect. So…
chris
  • 51
  • 1
  • 5
3
votes
1 answer

OpenFeign Builder default client

What is the default Client used by Openfeign Builder. OkHttp client Feign.builder().client(new feign.okhttp.OkHttpClient()).target(SomeData.class,"http://test.com"); What is the default…
Sarav
  • 245
  • 3
  • 12
3
votes
1 answer

Several Feign Clients with different errorDecoders in one Spring application

I'm trying to implement two different errorDecoders for two different Feign clients. My application fails to start exception Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.client.ClientFirst':…
Capacytron
  • 3,425
  • 6
  • 47
  • 80
3
votes
1 answer

Why to use multipart/form-data over application/octet-stream?

I'm not clear what they are and the less I can see when to use them. In example I have REST client and I want to send one file(.zip file), what exactly happens if I use any of those type application/octet-stream is I guess equal to application/zip,…
Zveratko
  • 2,663
  • 6
  • 35
  • 64
3
votes
2 answers

How to validate request parameters on feign client

Is there a way to add validation to feign clients on the request parameters. For example: @FeignClient public interface ZipCodeClient { @GetMapping("/zipcodes/{zipCode}") Optional findByZipCode(@PathVariable("zipCode") String…
postalservice14
  • 2,515
  • 4
  • 25
  • 33
3
votes
1 answer

How to Convert Blocking Feign Clients to Reactive Feign Clients

Introduction 1. We have quite a bunch of Spring microservices, some totally reactive (spring-webflux) and some old style (spring-web). 2. We use Feign to define API (and the client) in our microservices as interface and implement them in our…
Rad
  • 4,292
  • 8
  • 33
  • 71
3
votes
0 answers

AuthorizedFeignClient with custom role for JHipster microservices with UAA

I am working on some microservices generated with JHipster 6.1.0, which use the JHipster UAA server for authentication. The project consists of the following microservices: gateway UAA server publicMicroservice (microservice which allows…
Samuel
  • 105
  • 2
  • 12
3
votes
0 answers

How can I split feign interface to smaller interfaces in spring5

How can I split big feign interface to many small interfaces in spring5? It only works, when I explicitly set bean overriding in spring's configuration, but this is workaround, not the solution. I have one big feign interface: @FeignClient(name =…
mtw
  • 144
  • 10