by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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)

  • May 02 20:42

    velo on headers-overwrite

    (compare)

  • May 02 20:42

    velo on master

    Headers overwrite (#1219) * Ad… (compare)

  • May 02 05:03

    velo on headers-overwrite

    Add unit test illustrating #1217 Make sure content-type is limit… (compare)

  • Apr 25 20:22

    kdavisk6 on master

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

  • Apr 25 20:21

    kdavisk6 on 10.10.1

    prepare release 10.10.1 (compare)

  • Apr 22 02:29

    kdavisk6 on master

    Update JDK11 Builds in Travis t… (compare)

  • Apr 20 00:46

    kdavisk6 on master

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

  • Apr 20 00:46

    kdavisk6 on 10.10.0

    prepare release 10.10.0 (compare)

  • Apr 20 00:44

    kdavisk6 on master

    [travis skip] updating to next … (compare)

  • Apr 20 00:21

    kdavisk6 on master

    [travis skip] Correcting Snapsh… (compare)

  • Apr 20 00:20

    kdavisk6 on 10.9.1

    (compare)

  • Apr 20 00:20

    kdavisk6 on master

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

  • Apr 20 00:17

    kdavisk6 on master

    [travis skip] Corrected Snapsho… (compare)

  • Apr 19 20:36

    kdavisk6 on master

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

  • Apr 19 20:25

    kdavisk6 on master

    Ensure that Java 11 modules are… (compare)

  • Apr 19 20:09

    kdavisk6 on master

    Fix expansion of @RequestParam … (compare)

Kevin Davis
@kdavisk6
@lumiseven I am not aware of any known issues when using Feign during container startup. I suspect that your issue may be with the execution timeout in Hystrix being too short during container start.
@hellboy81 I'm not sure I follow your question on generification. Is it something to feign in particular or in the Annotation Error Decoder?
Alex Simkin
@SimY4
Hi! Can someone please have a look at this PR: OpenFeign/feign-annotation-error-decoder#26
Kevin Davis
@kdavisk6
OpenFeign 10.3.0 has been released to Maven Central - https://github.com/OpenFeign/feign/releases/tag/10.3.0
Max Syachin
@finnetrolle
Hi pals. Can someone have a look at this PRs please: OpenFeign/feign#1040 OpenFeign/feign#1039
Kevin Davis
@kdavisk6
@finnetrolle I have done a very quick once-over on these, but would like more time to review them. I will provide feedback in the next few days.
Max Syachin
@finnetrolle
@kdavisk6 feel free to provide any feedback please )
qepasa
@qepasa
Hi all. I was looking into adding code for this feature: OpenFeign/feign#678
Is this still something that maintainers would like to be done? I'm not sure what the process is with issues tagged 'proposal'. I find this issue interesting as this is something I recently dealt with when trying to add metrics for requests and ended up with a solution similar to the one in repo that is linked in first comment. My initial solution would be to add two fields to the Request class, namely uri and something like interfaceMethod or maybe configKey. I'm not sure whether I've got full understanding of feign codebase and all possible use cases so I'd be grateful for any suggestions or comments.
Kevin Davis
@kdavisk6
@qepasa Issues marked as proposal indicate that the community has requested a change to the API that needs more support before we'll consider accepting it. In HACKING we explain our philosophy of vetting changes by applying the Rule of Three. If you are interested in supporting #678, please vote for it by reacting to the first post in the issue.
Max Syachin
@finnetrolle
@kdavisk6 could you review OpenFeign/feign#1047 please?
Kevin Davis
@kdavisk6
@finnetrolle I reviewed and approved the changes this morning. Waiting on anything from velo
Kevin Davis
@kdavisk6
OpenFeign 10.4.0 has been released to Maven Central - https://github.com/OpenFeign/feign/releases/tag/10.4.0
Bogdan
@quitefire
Hi there, is it possible to make multipart/related requests using feign?Is there encoder created particularly for this type of request? I wasn't able to find any examples besides multipart/form-data which didn't work for me. I'm using feign-core with no spring framework integration.
Kevin Davis
@kdavisk6
@quitefire I believe you can, but you will need to use the feign-form library extension. It depends on feign-core and can be used without Spring.
alexandre melard
@mylen
Hi there,
I'd like to use openfeign to address different servers having the same REST interfaces depending on one parameter, is it possible?
for example:
Map<String, MyFeignClient> myFeignClients;
myFeignClients.put("serverA", MyFeignClient.create(serverAurl));
I don't want to use that code obviously but that's the idea
Shyam Baitmangalkar
@sbaitmangalkar

Hi there,
I'm actually exposing an API through feign and calling it in another microservice. This API returns a ResponseEntity. But if my understanding is right, feign is unable to deserialize ResponseEntity. The body of ResponseEntity is a List.

The actual API looks something like this:

@RequestMapping(value = "/v1/external/api/{id}/getInfo", method = RequestMethod.POST,
      produces = "application/json")
  public ResponseEntity getInformation(@PathVariable Integer id,
      @RequestBody InformationRequest informationRequest) {
    return fetchInformation(id, informationRequest);
  }

This above API is exposed in feign like:

@RequestLine("POST /v1/external/api/{id}/getInfo")
  @Headers("Content-Type: application/json")
  ResponseEntity getInformation(@Param(value = "id") Integer id,
      InformationRequest informationRequest);

I'm calling this API using a feign provider which I've written as shown below:

public ResponseEntity getInformation(Integer id, InformationRequest informationRequest)
      throws CustomException {
    try {
      return dataInformationProvider.getDataInformationService().getInformation(id,
          informationRequest);
    } catch (FeignException e) {
      String message = "Failed to get information for user: " + id + " and for request: "
          + informationRequest;
      throw new CustomException(message, e);
    }
  }

The call is successfully happening. But it throws:

Caused by: feign.FeignException: Can not deserialize instance of org.springframework.http.ResponseEntity out of START_ARRAY token

Is there a way to handle ResponseEntity in feign? Any inputs on this would be of great help.

Sinchana94
@Sinchana94
I have added feign client to spring batch and used it to get data in few tasklet and listener but afteradding it jobs are not registering to ApplicationContext, please advise
Alex Simkin
@SimY4
Hi :wave: Could someone help me out with merging this in? It was already approved: OpenFeign/feign#1105 Thank you!
Alex Simkin
@SimY4
Hi :wave: Can I get an approval on this one please? OpenFeign/feign-annotation-error-decoder#28
vinayak12
@vinayak12
@vinayak12
Spring boot with feign client first request takes time. Spring boot needs warming up. Can we initialize the feign client Annotaion at startup time ?
How to warm up the Springboot application for first request
vinayak12
@vinayak12
when we start the microservice application. the first request take 10 sec then next all the next request it takes 1 sec. Feign client added through annotaion. How to invoke inilitize the feign client as part of application startup
zaccoding
@zacscoding
Hello :) is there any wayt to put some metadata in Interceptors's RestTemplate ? this metadata doesn't need to include in http request.
nadavg54
@nadavg54
Hey everyone - maybe someone can help me.
Can I configure Feign client to get jwt token from another service(authentication service) and it to the header before calling any other service?
and add it*
Guschtel
@Guschtel
Hey there. I'm trying to use openfeign in my application, but i am pretty much stuck on "template has not been resolved" and i have no idea how to fix this. This happens when it tries to make a request against our oauth2 server to renew the access token.
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
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
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);