Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 11 05:27

    velo on master

    Fixes typo in JDoc (#1279) (compare)

  • Oct 11 05:26

    velo on snyk-fix-10b31d2c9b6a4e0b0e72a479a5634f69

    (compare)

  • Oct 11 05:26

    velo on master

    fix: httpclient/pom.xml to redu… (compare)

  • Oct 11 05:25

    velo on master

    Fixes propagation of unchecked … (compare)

  • Oct 10 00:24

    velo on snyk-fix-10b31d2c9b6a4e0b0e72a479a5634f69

    fix: httpclient/pom.xml to redu… (compare)

  • Oct 10 00:24

    velo on snyk-fix-10b31d2c9b6a4e0b0e72a479a5634f69

    (compare)

  • Sep 24 00:18

    kdavisk6 on master

    Serializable feign.Request #119… (compare)

  • Jul 02 14:10

    kdavisk6 on master

    Add support for Request Timeout… (compare)

  • Jun 09 21:01

    velo on 10.11

    (compare)

  • Jun 09 21:01

    velo on master

    prepare release 10.11 [travis skip] updating versions… (compare)

  • Jun 09 20:59

    velo on master

    Preparing next release version (compare)

  • Jun 09 20:57

    velo on master

    Add support for Dropwizard Metr… (compare)

  • Jun 02 06:01

    velo on velo-patch-1

    (compare)

  • Jun 02 06:01

    velo on master

    Rename `queryArrParams` to `que… (compare)

  • Jun 02 05:43

    velo on velo-patch-1

    Rename `queryArrParams` to `que… (compare)

  • Jun 02 05:40

    velo on master

    fixed query map with array para… (compare)

  • May 19 21:42

    velo on master

    update comment Retryer.java (#1… (compare)

  • May 11 23:51

    velo on master

    #1221: bump okhttp3 version fro… (compare)

  • May 03 04:58

    velo on feign-11

    Remove all deprecated methods (compare)

  • May 02 21:40

    velo on feign-11

    Begin work on next major release (compare)

Guschtel
@Guschtel
fixed by injecting a custom RequestInterceptor instead of using the provided one
hackweekedge
@hackweekedge
Hello, I have noticed, that feign.Request.Body only is able to take byte[] as an input. That crosses it out if it comes for some large file uploads. What I have found out is, that it should be rather simple to support InputStream aside with byte[]. What do you think?
hackweekedge
@hackweekedge
Just want your opinion, before I create a PR.
Kevin Davis
@kdavisk6
@zacscoding We don't have support for general "meta" information that is not destined to be part of the Request. If you are interested, please raise an issue in the repo.
@nadavg54 This is a pretty common use case, take a quick look at Stack Overflow for some examples. Here's one to get you started: https://stackoverflow.com/questions/48687206/feign-client-custom-interceptor-for-jwt-token-validation
@Guschtel This sounds like you are trying to make changes to a Request Template that is "mid-flight" . This is not allowed. Please raise an issue on the repo with a simple reproducible example so we can help.
@hackweekedge We don't support stream based uploads. See #220 for more information
Alexander Samsig
@Asamsig
Hey guys, if I want all my requests to send Content-Type: application/json, shouldn't it be possible to annotate my interface with @Headers("Content-Type: application/json") ? It doesn't seem to affect anything, so for now I have consumes = "application/json" in every RequestMapping.
Saheb Preet Singh
@sahebpreet
Hey guys, I am trying to use feign client for one of my projects and was wondering if there is text/csv decoder support to directly convert CSV to a list of POJOs?
Alexander Samsig
@Asamsig
Is it possible to have a custom object as a header in Feign, which should be serialized as JSON?
I have something like this:
    @GetMapping(path = "/myObject/{myObjectId}")
    MyObject getMyObject(@RequestHeader("X-USER-HEADER") UserObject user, @PathVariable("myObjectId") String myObjectId);
Rob
@robmoore-i

Hey people,

I need to consume an API which requires square brackets in the URL. For example: GET /my-api/users?filter[profile-id]=01S0031210Z . Whenever I try to make this call using a Feign client, my square brackets are URL encoded no matter what I do.

My final attempt was to add my query parameter in a custom RequestInterceptor. The method called was RequestInterceptor::query(String key, String... values). It became clear that any modification I tried to make to the URL would be URL encoded, including rewriting the whole URI.

I've have dug through the source code and identified the following source of this inflexibility:

In the constructor of QueryTemplate, it instantiates its 'name' field (referring to the name of the query parameter) as a new Template(...). It passes the encoding option "EncodingOptions.REQUIRED" which suggests to me that the expansion of this template will definitely be URL encoded. Because the EncodingOptions are passed in this way, there is no opportunity for us as users to override that behaviour. We are stuck with having mandatory URL encoding for the components of our request, rather than having the flexibility to support all systems.

The solution here is to pull up the injection of the EncodingOptions to a point at which your users can set it themselves, for a given request modification.

Many Thanks,

Rob

jaruwit suriyo
@kingbom
I want to handle FeignException message error
Alex Simkin
@SimY4
Hello there :wave: May I remind you that this is still an issue: OpenFeign/feign-annotation-error-decoder#28 Can I get some approvals
DMdavydov
@DMdavydov
hey, any solution for headers as Object like
public Response(@RequestHeader Headers headers);
hplicious
@ravedien
Hi Guys, is there a way on differentiating if the feign client is calling a down service.
since when implementing connectionTimeout & requestTimeout it always throwing a hystrixRuntimeException
i expect to have a feignException
1 reply
PullDakar
@PullDakar
Hi guys! I have a problem. The service is divided into two modules. One of them is api (interfaces (feign) + dto), and the second is impl (spring boot application). In this case, the controllers are inherited from the api interfaces. One of the controllers accepts MultipartFile as @RequestPart. How to process it through feign? There is a strict requirement - the api module is implemented only through the feign annotations (RequestLine, Body etc.)
Kevin Davis
@kdavisk6
@robmoore-i, that's intentional as all reserved characters, including brackets must be pct-encoded per the URI template specification. All HTTP/1.1 complaint servers will be able to accept either /my-api/users?filter[profile-id]=01S0031210Z or /my-api/users?filter%5Bprofile-id%5D=01S0031210Z with the encoding handled properly. If the receiving server is not accepting the encoded values, I would look into why that is, because it would mean that the server is not compliant.
@DMdavydov you should be able to use @RequestHeaders assuming you are using Spring Cloud OpenFeign.
@PullDakar there is no strict requirement that the Feign interfaces reside with the controllers.
farhoudi
@farhoudi

Dears,
This is my feign client:

@RequestMapping(method = RequestMethod.POST, path = "${auth.url}",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
GetTokenResponse getToken(GetTokenRequest getTokenRequest);

And here is my request's model:

@Data
@Builder
public class GetTokenRequest {
    @Builder.Default
    @JsonProperty("grant_type")
    private String grantType = "password";
    private String username;
    private String password;
}

I want grantType to be passed as grant_type, but @JsonProperty is not working and this is my fein's log:

password=mypassword&grantType=password&username=myusername
2 replies
I have tried @JsonSetter, @JsonGetter, @JsonAlias and @SerializedName annotations.
Could you please help me?
Mingliang
@mingliangguo
Anyone uses HystrixFeign noticed that the requests are made sequentially when Semaphore execution strategy is used? Or have any idea what might have caused it? Here is my hystrix config:
hystrix:
  command:
    default:
      execution:
        isolation:
         strategy: SEMAPHORE
         semaphore:
           maxConcurrentRequests: 5000
Marquis Blount
@mlblount45
Trying to get Patch working with my feign client. Ive added io.github.openfeign:feign-httpclient:jar:10.2.3 to the classpath but still get an exception when trying to make the patch call Invalid HTTP method: PATCH executing PATCH...
Feign client method looks like this
@PatchMapping("/devices")
  AppDevice patchDevice(@RequestHeader(AUTHORIZATION) String apiKey, AppDevice device);
gurgenselman
@gurgenselman
hello, i have a question about feign client
i want to retry my request when i will have 401
i added errordecoder, and i check if error is 401, and i throw to RetryableException to retry request
but it just shows Exception on console, it doesn't retries
I use it with spring boot
should I add some config to activate this retry option?
image.png
my error decoder is like that
I don't want to have exception on console, just want it to retry once when it will have 401 from server
gurgenselman
@gurgenselman
image.png
gurgenselman
@gurgenselman
okay i understood problem. i needed to add custom retryer , so it is working now
eladbs
@eladbs

Hi, I'm using Spring Boot and have issues where a @PathVariable is being encoded.

    @GetMapping(path = "${host_url}/{id}")
    Response getDataById(@PathVariable("id") String id);

Passing as 'id' a string with a special character encodes it.
Is there any option to disable encoding on this parameter?

choojoykin
@choojoykin
hi all. im using okhttp as feign client. im setting followRedirects = false, but feign still follow 302 url. how to fix it?
shivasantosh
@shivasantosh

Fallback service is wrapping ProductNotFoundException into HystrixRunTimeException.
I want to propagate custom exception as it is instead of wrapping into HystrixRunTimeException.
Below is the code snippet for reference:

@FeignClient(name = "service1", fallback = FallBackService1.class )
public interface FeignService1{
String validateProducts(Product product);
}

class FallBackService1 implements FeignService1{
@override
public String validateProducts(Product product){
throw new ProductNotFoundException("P119","Product not found");
}
}

I have enabled
feign.hystrix.enable = true.

Please help with this. I want to propagate the exception as it is. I do not want it to be wrapped.

Did someone face this issue??
Daniel Warkentin
@dnl-re
Hi, I'm having difficulties configuring a custom error decoder. I tried 3 ways: defining it in the config file, defining it in the client configuration as bean and defining it via .errorDecoder() in the feign.builder(). I don't know why the decode() method will not be invoked on a 404 or 504... could somebody help me? This problem partains to my question on stackoverflow: https://stackoverflow.com/questions/62453241/feign-errordecoder-is-not-invoked-how-to-configure-feign-to-use-it
image.png
Daniel Warkentin
@dnl-re
I now have a minimal reproducible example in this git repo: https://github.com/dnl-re/feign-error-decoder-problem
4 replies
Tommaso Garuglieri
@GaruGaru
Hi, I'm trying to implement a custom annotation processor for feign in order to process specific objects (in particular Jaeger Spans) and modify the outgoing http request.
What is the suggested best practice regarding the implementation ?
The documentation states that is possible to implement a custom feign.Contract but, from my understanding, it would override the default contract/ann. processor
Eduardo Berton
@duberton
hello guys. not sure if this is happening on feign's side: i'd like to disable FeignException's message truncation.
Akhil Vasudevan
@akhil-vasudevan
Hello folks... What is the recommended approach for using Feign for asynchronous API calls ?
mahyar_shariati
@MahyarShariati_twitter
Hi guys
i have a specific question from you developers
on scale of 1 to 5 (low to high) how do you rate your "teamWork" skill?
eyalringort
@eyalringort
Hi,
I'm trying to define basic auth for one feign client only (i.e. other feign clients in the same project won't be affected and will not add basic auth headers). I found this:
OpenFeign/feign#1124
And this:
https://stackoverflow.com/questions/39606744/how-to-consume-basic-authentication-protected-restful-web-service-via-feign-clie
However, my application had no @ComponentScan annotation directly but just the one inherited from the @SpringBootApplication annotation. So my question is how do I achieve the desired behaviour (i.e. basic auth for only one feign client) in my project?
raulhsj
@raulhsj

Hi, I have a @FeignClient and trying to send a POST to this endpoint

@RequestMapping(method = RequestMethod.POST,
                  value = "/private/notifications")
  void sendNotification(
    @RequestBody
      PushNotificationDTO notificationDTO);

but I'm getting this error:

feign.FeignException$BadRequest: status 400 reading PrivateIamClient#sendNotification(PushNotificationDTO)

Some little help'll be appreciated. Thx!!

Chris
@ChrisWeissmann
Hi Feign team, fairly new to feign so forgive me if I am overlooking something critical here. I am trying to setup a client that makes requests to a server secured via oauth2. I read and found examples where using DefaultOAuth2ClientContext are deprecated sind moving to Spring security 5. I can't seem to find how the correct way is now. Any pointers on where to find this?
Alex Simkin
@SimY4
Hello. Can we get a release of this one? https://github.com/OpenFeign/feign-annotation-error-decoder ? It's been broken for Feign versions later than 10.7, the fix was merged but never released.
RoySunnySean007
@RoySunnySean007
Dear all, does anyone have recommendation for feign.httpclient.max-connections-per-route? the default value is 50. Thx in advance!