Giter Club home page Giter Club logo

Comments (9)

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

from feign.

jdamick avatar jdamick commented on May 15, 2024

yeah, that's good too. How would you set the media type for that interceptor?
some like:

Feign.builder().requestInterceptor(new RequestMediaTypeInterceptor("application/json"))

or like

Feign.builder().contentType("application/json") // under the covers add the interceptor?

or did you have something else in mind?

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

from feign.

jdamick avatar jdamick commented on May 15, 2024

I linked to a commit ^ - before i spend too much more time i wanted to see if this was more inline.. (i'm sure some naming might need tweaking)

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

Looks good! One nit would be to adjust the javadoc on Headers to suggest that they are additive, so don't place anything on the type that isn't meant for all methods. That and a test case that shows this. (ex. adding the same header twice = 2 values). Good job, Jeff!

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

oof.. @jdamick we have a hitch. My intention is that 8.x is feature compatible with 7.x. That way, folks can migrate cleanly off dagger via the 7-8 bridge. Also, Spring implement Contract. We probably want to avoid changing the Contract interface as a part of this change.

What that means is that we'd need some logic to reach up to the type in parseAndValidatateMetadata to find the base headers. Ex.

Headers fromType = method.getDeclaringClass().getAnnotation(Headers.class);

Ack that is more expensive than your approach. Wdyt about saving Contract interface refactors for when we bang our heads around hystrix/rxnetty?

from feign.

jdamick avatar jdamick commented on May 15, 2024

I have no burning need for it at the moment, so i'm fine with waiting until 9.

from feign.

codefromthecrypt avatar codefromthecrypt commented on May 15, 2024

added to 7.4/8.1 release after realizing a simple way to accomplish this portably.

from feign.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.