Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 10 18:24

    velo on 10.13

    (compare)

  • May 10 18:23

    velo on 10.13

    prepare release (compare)

  • May 08 04:44

    velo on master

    Point the mindmap at the master… (compare)

  • May 07 18:48

    velo on master

    Change MindMap to PlantUML (#13… (compare)

  • May 04 22:31

    velo on master

    Fix license header (compare)

  • May 04 22:30

    velo on master

    Set next development version to… (compare)

  • May 04 22:29

    velo on master

    Using same git url for connecti… Fix release plugin to download … (compare)

  • May 04 22:22

    velo on 11.2

    Using same git url for connecti… prepare release (compare)

  • May 04 22:20

    velo on master

    prepare release [ci skip] updating versions to … (compare)

  • May 03 22:37

    velo on master

    WIP: Add support for java 9 (#1… (compare)

  • May 03 20:23

    velo on safe_default_methodhandler

    (compare)

  • May 03 04:14

    velo on safe_default_methodhandler

    Create SafeDefaultMethodHandleF… (compare)

  • May 03 04:10

    velo on safe_default_methodhandler

    Create SafeDefaultMethodHandleF… (compare)

  • May 03 04:05

    velo on safe_default_methodhandler

    Create SafeDefaultMethodHandleF… (compare)

  • May 03 03:56

    velo on safe_default_methodhandler

    Create SafeDefaultMethodHandleF… (compare)

  • May 03 03:38

    velo on safe_default_methodhandler

    Add support for java 9 Move multi-release to java 9 on… Create SafeDefaultMethodHandleF… (compare)

  • Apr 27 07:57

    velo on master

    Fixed version (#1391) (cherry … (compare)

  • Apr 22 02:00

    kdavisk6 on master

    Make the FieldQueryMapEncoder e… (compare)

  • Mar 14 21:11

    velo on 11.1

    Update license headers (compare)

  • Mar 14 21:11

    velo on 11.1

    (compare)

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!
Nasibulloh
@Nasibulloh
Hi there! I have a question regarding to Feign client. In my case I cannot get response after sending request. Exception is Decoding exception. I tried to fix it by customizing decoder, but It did not help. Who can help me to solve it please?
feign.codec.DecodeException: Error while extracting response for type [java.util.concurrent.CompletableFuture<org.springframework.http.ResponseEntity<?>>] and content type [application/json]; nested exception is org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Unrecognized token 'Body': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false'); nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'Body': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
at [Source: (PushbackInputStream); line: 1, column: 5]
David Crespo
@iguannago

@iguannago
Hi here
has anyone tried to use Feign client with parametrised types like below?
@FeignClient(
name = "some name",
url = "some url"
)

public interface WaWorkflowApiClient<T, S> {
apparently, it's not supported: Parameterized types unsupported

could you advise, please?
Okue
@okue
Hi, here.
Does OpenFeign have a plan to support percentile metrics for MicrometerCapability.java?
https://github.com/OpenFeign/feign/tree/master/micrometer/src/main/java/feign/micrometer
Chris T
@Chris1712
Hi - I have a question about the extensions of FeignException. Many HTTP errors are implemented as specific exceptions but some are missing - for example we have FeignException.Gone for HTTP 410, but there's no FeignException.PreconditionFailed for HTTP 412. Is there a rationale behind some being missing? If not I'll raise a PR to add the missing ones.
Aaron Tobias
@iamgollum
@iguannago same here. Parameterized support on a @FeignClient class would be very useful! I noticed there is no ticket in github. The closest concept related is the mulitple inheritance here: OpenFeign/feign#1284. Wonder if we need to create some base class for now and extend from that for time being and then downcast... Could anyone please advise?
Aaron Tobias
@iamgollum
Filed here: OpenFeign/feign#1356
Aaron Tobias
@iamgollum
@iguannago for now I would just use Object since the client abstracts away enough of the implementation where the name of the client instance should be good enough to identity what you intend on sending through within the domain context.
Everton Freire
@efres
Hi there, could someone help on this issue: OpenFeign/feign#1361 ?
Tommy Schmidt
@DarkAtra

Hey guys, is there any particular reason why the Capability interface does not contain an enrich method for ErrorDecoders?

We have been thinking about adding a capability to our clients to have metrics for our custom error decoder.

Justin Sexton
@JSextonn
Hey all, does Feign easily support throwing a RetryableException on 2xx response in some way? ErrorDecoders can clearly throw them but these are only executed on 4xx-5xx responses.
Justin Sexton
@JSextonn
Seems like this would only be possible via a custom Decoder?
Olga Maciaszek-Sharma
@OlgaMaciaszek
Hi @kdavisk6 @velo What are the plans regarding AsyncFeign? I see it's marked as @Experimental? Is there a plan of moving it out of the experimental status?
2 replies
Also, are there any plans regarding OpenFeign/feign#1319