Feign makes writing java http clients easier

Overview

Feign makes writing java http clients easier

Join the chat at https://gitter.im/OpenFeign/feign CircleCI Maven Central

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.


Why Feign and not X?

Feign uses tools like Jersey and CXF to write java clients for ReST or SOAP services. Furthermore, Feign allows you to write your own code on top of http libraries such as Apache HC. Feign connects your code to http APIs with minimal overhead and code via customizable decoders and error handling, which can be written to any text-based http API.

How does Feign work?

Feign works by processing annotations into a templatized request. Arguments are applied to these templates in a straightforward fashion before output. Although Feign is limited to supporting text-based APIs, it dramatically simplifies system aspects such as replaying requests. Furthermore, Feign makes it easy to unit test your conversions knowing this.

Java Version Compatibility

Feign 10.x and above are built on Java 8 and should work on Java 9, 10, and 11. For those that need JDK 6 compatibility, please use Feign 9.x

Feature overview

This is a map with current key features provided by feign:

MindMap overview

Roadmap

Feign 11 and beyond

Making API clients easier

Short Term - What we're working on now.

  • Response Caching
    • Support caching of api responses. Allow for users to define under what conditions a response is eligible for caching and what type of caching mechanism should be used.
    • Support in-memory caching and external cache implementations (EhCache, Google, Spring, etc...)
  • Complete URI Template expression support
  • Logger API refactor
    • Refactor the Logger API to adhere closer to frameworks like SLF4J providing a common mental model for logging within Feign. This model will be used by Feign itself throughout and provide clearer direction on how the Logger will be used.
  • Retry API refactor
    • Refactor the Retry API to support user-supplied conditions and better control over back-off policies. This may result in non-backward-compatible breaking changes

Medium Term - What's up next.

  • Async execution support via CompletableFuture
    • Allow for Future chaining and executor management for the request/response lifecycle. Implementation will require non-backward-compatible breaking changes. However this feature is required before Reactive execution can be considered.
  • Reactive execution support via Reactive Streams
    • For JDK 9+, consider a native implementation that uses java.util.concurrent.Flow.
    • Support for Project Reactor and RxJava 2+ implementations on JDK 8.

Long Term - The future ☁️

  • Additional Circuit Breaker Support.
    • Support additional Circuit Breaker implementations like Resilience4J and Spring Circuit Breaker

Basics

Usage typically looks like this, an adaptation of the canonical Retrofit sample.

interface GitHub {
  @RequestLine("GET /repos/{owner}/{repo}/contributors")
  List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);

  @RequestLine("POST /repos/{owner}/{repo}/issues")
  void createIssue(Issue issue, @Param("owner") String owner, @Param("repo") String repo);

}

public static class Contributor {
  String login;
  int contributions;
}

public static class Issue {
  String title;
  String body;
  List<String> assignees;
  int milestone;
  List<String> labels;
}

public class MyApp {
  public static void main(String... args) {
    GitHub github = Feign.builder()
                         .decoder(new GsonDecoder())
                         .target(GitHub.class, "https://api.github.com");

    // Fetch and print a list of the contributors to this library.
    List<Contributor> contributors = github.contributors("OpenFeign", "feign");
    for (Contributor contributor : contributors) {
      System.out.println(contributor.login + " (" + contributor.contributions + ")");
    }
  }
}

Interface Annotations

Feign annotations define the Contract between the interface and how the underlying client should work. Feign's default contract defines the following annotations:

Annotation Interface Target Usage
@RequestLine Method Defines the HttpMethod and UriTemplate for request. Expressions, values wrapped in curly-braces {expression} are resolved using their corresponding @Param annotated parameters.
@Param Parameter Defines a template variable, whose value will be used to resolve the corresponding template Expression, by name provided as annotation value. If value is missing it will try to get the name from bytecode method parameter name (if the code was compiled with -parameters flag).
@Headers Method, Type Defines a HeaderTemplate; a variation on a UriTemplate. that uses @Param annotated values to resolve the corresponding Expressions. When used on a Type, the template will be applied to every request. When used on a Method, the template will apply only to the annotated method.
@QueryMap Parameter Defines a Map of name-value pairs, or POJO, to expand into a query string.
@HeaderMap Parameter Defines a Map of name-value pairs, to expand into Http Headers
@Body Method Defines a Template, similar to a UriTemplate and HeaderTemplate, that uses @Param annotated values to resolve the corresponding Expressions.

Overriding the Request Line

If there is a need to target a request to a different host then the one supplied when the Feign client was created, or you want to supply a target host for each request, include a java.net.URI parameter and Feign will use that value as the request target.

@RequestLine("POST /repos/{owner}/{repo}/issues")
void createIssue(URI host, Issue issue, @Param("owner") String owner, @Param("repo") String repo);

Templates and Expressions

Feign Expressions represent Simple String Expressions (Level 1) as defined by URI Template - RFC 6570. Expressions are expanded using their corresponding Param annotated method parameters.

Example

public interface GitHub {

  @RequestLine("GET /repos/{owner}/{repo}/contributors")
  List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repository);

  class Contributor {
    String login;
    int contributions;
  }
}

public class MyApp {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                         .decoder(new GsonDecoder())
                         .target(GitHub.class, "https://api.github.com");

    /* The owner and repository parameters will be used to expand the owner and repo expressions
     * defined in the RequestLine.
     *
     * the resulting uri will be https://api.github.com/repos/OpenFeign/feign/contributors
     */
    github.contributors("OpenFeign", "feign");
  }
}

Expressions must be enclosed in curly braces {} and may contain regular expression patterns, separated by a colon : to restrict resolved values. Example owner must be alphabetic. {owner:[a-zA-Z]*}

Request Parameter Expansion

RequestLine and QueryMap templates follow the URI Template - RFC 6570 specification for Level 1 templates, which specifies the following:

  • Unresolved expressions are omitted.
  • All literals and variable values are pct-encoded, if not already encoded or marked encoded via a @Param annotation.

Undefined vs. Empty Values

Undefined expressions are expressions where the value for the expression is an explicit null or no value is provided. Per URI Template - RFC 6570, it is possible to provide an empty value for an expression. When Feign resolves an expression, it first determines if the value is defined, if it is then the query parameter will remain. If the expression is undefined, the query parameter is removed. See below for a complete breakdown.

Empty String

public void test() {
   Map<String, Object> parameters = new LinkedHashMap<>();
   parameters.put("param", "");
   this.demoClient.test(parameters);
}

Result

http://localhost:8080/test?param=

Missing

public void test() {
   Map<String, Object> parameters = new LinkedHashMap<>();
   this.demoClient.test(parameters);
}

Result

http://localhost:8080/test

Undefined

public void test() {
   Map<String, Object> parameters = new LinkedHashMap<>();
   parameters.put("param", null);
   this.demoClient.test(parameters);
}

Result

http://localhost:8080/test

See Advanced Usage for more examples.

What about slashes? /

@RequestLine templates do not encode slash / characters by default. To change this behavior, set the decodeSlash property on the @RequestLine to false.

What about plus? +

Per the URI specification, a + sign is allowed in both the path and query segments of a URI, however, handling of the symbol on the query can be inconsistent. In some legacy systems, the + is equivalent to the a space. Feign takes the approach of modern systems, where a + symbol should not represent a space and is explicitly encoded as %2B when found on a query string.

If you wish to use + as a space, then use the literal character or encode the value directly as %20

Custom Expansion

The @Param annotation has an optional property expander allowing for complete control over the individual parameter's expansion. The expander property must reference a class that implements the Expander interface:

public interface Expander {
    String expand(Object value);
}

The result of this method adheres to the same rules stated above. If the result is null or an empty string, the value is omitted. If the value is not pct-encoded, it will be. See Custom @Param Expansion for more examples.

Request Headers Expansion

Headers and HeaderMap templates follow the same rules as Request Parameter Expansion with the following alterations:

  • Unresolved expressions are omitted. If the result is an empty header value, the entire header is removed.
  • No pct-encoding is performed.

See Headers for examples.

A Note on @Param parameters and their names:

All expressions with the same name, regardless of their position on the @RequestLine, @QueryMap, @BodyTemplate, or @Headers will resolve to the same value. In the following example, the value of contentType, will be used to resolve both the header and path expression:

public interface ContentService {
  @RequestLine("GET /api/documents/{contentType}")
  @Headers("Accept: {contentType}")
  String getDocumentByType(@Param("contentType") String type);
}

Keep this in mind when designing your interfaces.

Request Body Expansion

Body templates follow the same rules as Request Parameter Expansion with the following alterations:

  • Unresolved expressions are omitted.
  • Expanded value will not be passed through an Encoder before being placed on the request body.
  • A Content-Type header must be specified. See Body Templates for examples.

Customization

Feign has several aspects that can be customized.
For simple cases, you can use Feign.builder() to construct an API interface with your custom components.
For request setting, you can use options(Request.Options options) on target() to set connectTimeout, connectTimeoutUnit, readTimeout, readTimeoutUnit, followRedirects.
For example:

interface Bank {
  @RequestLine("POST /account/{id}")
  Account getAccountInfo(@Param("id") String id);
}

public class BankService {
  public static void main(String[] args) {
    Bank bank = Feign.builder()
        .decoder(new AccountDecoder())
        .options(new Request.Options(10, TimeUnit.SECONDS, 60, TimeUnit.SECONDS, true))
        .target(Bank.class, "https://api.examplebank.com");
  }
}

Multiple Interfaces

Feign can produce multiple api interfaces. These are defined as Target<T> (default HardCodedTarget<T>), which allow for dynamic discovery and decoration of requests prior to execution.

For example, the following pattern might decorate each request with the current url and auth token from the identity service.

public class CloudService {
  public static void main(String[] args) {
    CloudDNS cloudDNS = Feign.builder()
      .target(new CloudIdentityTarget<CloudDNS>(user, apiKey));
  }

  class CloudIdentityTarget extends Target<CloudDNS> {
    /* implementation of a Target */
  }
}

Examples

Feign includes example GitHub and Wikipedia clients. The denominator project can also be scraped for Feign in practice. Particularly, look at its example daemon.


Integrations

Feign intends to work well with other Open Source tools. Modules are welcome to integrate with your favorite projects!

Gson

Gson includes an encoder and decoder you can use with a JSON API.

Add GsonEncoder and/or GsonDecoder to your Feign.Builder like so:

public class Example {
  public static void main(String[] args) {
    GsonCodec codec = new GsonCodec();
    GitHub github = Feign.builder()
                         .encoder(new GsonEncoder())
                         .decoder(new GsonDecoder())
                         .target(GitHub.class, "https://api.github.com");
  }
}

Jackson

Jackson includes an encoder and decoder you can use with a JSON API.

Add JacksonEncoder and/or JacksonDecoder to your Feign.Builder like so:

public class Example {
  public static void main(String[] args) {
      GitHub github = Feign.builder()
                     .encoder(new JacksonEncoder())
                     .decoder(new JacksonDecoder())
                     .target(GitHub.class, "https://api.github.com");
  }
}

Sax

SaxDecoder allows you to decode XML in a way that is compatible with normal JVM and also Android environments.

Here's an example of how to configure Sax response parsing:

public class Example {
  public static void main(String[] args) {
      Api api = Feign.builder()
         .decoder(SAXDecoder.builder()
                            .registerContentHandler(UserIdHandler.class)
                            .build())
         .target(Api.class, "https://apihost");
    }
}

JAXB

JAXB includes an encoder and decoder you can use with an XML API.

Add JAXBEncoder and/or JAXBDecoder to your Feign.Builder like so:

public class Example {
  public static void main(String[] args) {
    Api api = Feign.builder()
             .encoder(new JAXBEncoder())
             .decoder(new JAXBDecoder())
             .target(Api.class, "https://apihost");
  }
}

JAX-RS

JAXRSContract overrides annotation processing to instead use standard ones supplied by the JAX-RS specification. This is currently targeted at the 1.1 spec.

Here's the example above re-written to use JAX-RS:

interface GitHub {
  @GET @Path("/repos/{owner}/{repo}/contributors")
  List<Contributor> contributors(@PathParam("owner") String owner, @PathParam("repo") String repo);
}

public class Example {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                       .contract(new JAXRSContract())
                       .target(GitHub.class, "https://api.github.com");
  }
}

OkHttp

OkHttpClient directs Feign's http requests to OkHttp, which enables SPDY and better network control.

To use OkHttp with Feign, add the OkHttp module to your classpath. Then, configure Feign to use the OkHttpClient:

public class Example {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                     .client(new OkHttpClient())
                     .target(GitHub.class, "https://api.github.com");
  }
}

Ribbon

RibbonClient overrides URL resolution of Feign's client, adding smart routing and resiliency capabilities provided by Ribbon.

Integration requires you to pass your ribbon client name as the host part of the url, for example myAppProd.

public class Example {
  public static void main(String[] args) {
    MyService api = Feign.builder()
          .client(RibbonClient.create())
          .target(MyService.class, "https://myAppProd");
  }
}

Java 11 Http2

Http2Client directs Feign's http requests to Java11 New HTTP/2 Client that implements HTTP/2.

To use New HTTP/2 Client with Feign, use Java SDK 11. Then, configure Feign to use the Http2Client:

GitHub github = Feign.builder()
                     .client(new Http2Client())
                     .target(GitHub.class, "https://api.github.com");

Hystrix

HystrixFeign configures circuit breaker support provided by Hystrix.

To use Hystrix with Feign, add the Hystrix module to your classpath. Then use the HystrixFeign builder:

public class Example {
  public static void main(String[] args) {
    MyService api = HystrixFeign.builder().target(MyService.class, "https://myAppProd");
  }
}

SOAP

SOAP includes an encoder and decoder you can use with an XML API.

This module adds support for encoding and decoding SOAP Body objects via JAXB and SOAPMessage. It also provides SOAPFault decoding capabilities by wrapping them into the original javax.xml.ws.soap.SOAPFaultException, so that you'll only need to catch SOAPFaultException in order to handle SOAPFault.

Add SOAPEncoder and/or SOAPDecoder to your Feign.Builder like so:

public class Example {
  public static void main(String[] args) {
    Api api = Feign.builder()
	     .encoder(new SOAPEncoder(jaxbFactory))
	     .decoder(new SOAPDecoder(jaxbFactory))
	     .errorDecoder(new SOAPErrorDecoder())
	     .target(MyApi.class, "http://api");
  }
}

NB: you may also need to add SOAPErrorDecoder if SOAP Faults are returned in response with error http codes (4xx, 5xx, ...)

SLF4J

SLF4JModule allows directing Feign's logging to SLF4J, allowing you to easily use a logging backend of your choice (Logback, Log4J, etc.)

To use SLF4J with Feign, add both the SLF4J module and an SLF4J binding of your choice to your classpath. Then, configure Feign to use the Slf4jLogger:

public class Example {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                     .logger(new Slf4jLogger())
                     .logLevel(Level.FULL)
                     .target(GitHub.class, "https://api.github.com");
  }
}

Decoders

Feign.builder() allows you to specify additional configuration such as how to decode a response.

If any methods in your interface return types besides Response, String, byte[] or void, you'll need to configure a non-default Decoder.

Here's how to configure JSON decoding (using the feign-gson extension):

public class Example {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                     .decoder(new GsonDecoder())
                     .target(GitHub.class, "https://api.github.com");
  }
}

If you need to pre-process the response before give it to the Decoder, you can use the mapAndDecode builder method. An example use case is dealing with an API that only serves jsonp, you will maybe need to unwrap the jsonp before send it to the Json decoder of your choice:

public class Example {
  public static void main(String[] args) {
    JsonpApi jsonpApi = Feign.builder()
                         .mapAndDecode((response, type) -> jsopUnwrap(response, type), new GsonDecoder())
                         .target(JsonpApi.class, "https://some-jsonp-api.com");
  }
}

Encoders

The simplest way to send a request body to a server is to define a POST method that has a String or byte[] parameter without any annotations on it. You will likely need to add a Content-Type header.

interface LoginClient {
  @RequestLine("POST /")
  @Headers("Content-Type: application/json")
  void login(String content);
}

public class Example {
  public static void main(String[] args) {
    client.login("{\"user_name\": \"denominator\", \"password\": \"secret\"}");
  }
}

By configuring an Encoder, you can send a type-safe request body. Here's an example using the feign-gson extension:

static class Credentials {
  final String user_name;
  final String password;

  Credentials(String user_name, String password) {
    this.user_name = user_name;
    this.password = password;
  }
}

interface LoginClient {
  @RequestLine("POST /")
  void login(Credentials creds);
}

public class Example {
  public static void main(String[] args) {
    LoginClient client = Feign.builder()
                              .encoder(new GsonEncoder())
                              .target(LoginClient.class, "https://foo.com");

    client.login(new Credentials("denominator", "secret"));
  }
}

@Body templates

The @Body annotation indicates a template to expand using parameters annotated with @Param. You will likely need to add a Content-Type header.

interface LoginClient {

  @RequestLine("POST /")
  @Headers("Content-Type: application/xml")
  @Body("<login \"user_name\"=\"{user_name}\" \"password\"=\"{password}\"/>")
  void xml(@Param("user_name") String user, @Param("password") String password);

  @RequestLine("POST /")
  @Headers("Content-Type: application/json")
  // json curly braces must be escaped!
  @Body("%7B\"user_name\": \"{user_name}\", \"password\": \"{password}\"%7D")
  void json(@Param("user_name") String user, @Param("password") String password);
}

public class Example {
  public static void main(String[] args) {
    client.xml("denominator", "secret"); // <login "user_name"="denominator" "password"="secret"/>
    client.json("denominator", "secret"); // {"user_name": "denominator", "password": "secret"}
  }
}

Headers

Feign supports settings headers on requests either as part of the api or as part of the client depending on the use case.

Set headers using apis

In cases where specific interfaces or calls should always have certain header values set, it makes sense to define headers as part of the api.

Static headers can be set on an api interface or method using the @Headers annotation.

@Headers("Accept: application/json")
interface BaseApi<V> {
  @Headers("Content-Type: application/json")
  @RequestLine("PUT /api/{key}")
  void put(@Param("key") String key, V value);
}

Methods can specify dynamic content for static headers using variable expansion in @Headers.

public interface Api {
   @RequestLine("POST /")
   @Headers("X-Ping: {token}")
   void post(@Param("token") String token);
}

In cases where both the header field keys and values are dynamic and the range of possible keys cannot be known ahead of time and may vary between different method calls in the same api/client (e.g. custom metadata header fields such as "x-amz-meta-*" or "x-goog-meta-*"), a Map parameter can be annotated with HeaderMap to construct a query that uses the contents of the map as its header parameters.

public interface Api {
   @RequestLine("POST /")
   void post(@HeaderMap Map<String, Object> headerMap);
}

These approaches specify header entries as part of the api and do not require any customizations when building the Feign client.

Setting headers per target

To customize headers for each request method on a Target, a RequestInterceptor can be used. RequestInterceptors can be shared across Target instances and are expected to be thread-safe. RequestInterceptors are applied to all request methods on a Target.

If you need per method customization, a custom Target is required, as the a RequestInterceptor does not have access to the current method metadata.

For an example of setting headers using a RequestInterceptor, see the Request Interceptors section.

Headers can be set as part of a custom Target.

  static class DynamicAuthTokenTarget<T> implements Target<T> {
    public DynamicAuthTokenTarget(Class<T> clazz,
                                  UrlAndTokenProvider provider,
                                  ThreadLocal<String> requestIdProvider);

    @Override
    public Request apply(RequestTemplate input) {
      TokenIdAndPublicURL urlAndToken = provider.get();
      if (input.url().indexOf("http") != 0) {
        input.insert(0, urlAndToken.publicURL);
      }
      input.header("X-Auth-Token", urlAndToken.tokenId);
      input.header("X-Request-ID", requestIdProvider.get());

      return input.request();
    }
  }

  public class Example {
    public static void main(String[] args) {
      Bank bank = Feign.builder()
              .target(new DynamicAuthTokenTarget(Bank.class, provider, requestIdProvider));
    }
  }

These approaches depend on the custom RequestInterceptor or Target being set on the Feign client when it is built and can be used as a way to set headers on all api calls on a per-client basis. This can be useful for doing things such as setting an authentication token in the header of all api requests on a per-client basis. The methods are run when the api call is made on the thread that invokes the api call, which allows the headers to be set dynamically at call time and in a context-specific manner -- for example, thread-local storage can be used to set different header values depending on the invoking thread, which can be useful for things such as setting thread-specific trace identifiers for requests.

Advanced usage

Base Apis

In many cases, apis for a service follow the same conventions. Feign supports this pattern via single-inheritance interfaces.

Consider the example:

interface BaseAPI {
  @RequestLine("GET /health")
  String health();

  @RequestLine("GET /all")
  List<Entity> all();
}

You can define and target a specific api, inheriting the base methods.

interface CustomAPI extends BaseAPI {
  @RequestLine("GET /custom")
  String custom();
}

In many cases, resource representations are also consistent. For this reason, type parameters are supported on the base api interface.

@Headers("Accept: application/json")
interface BaseApi<V> {

  @RequestLine("GET /api/{key}")
  V get(@Param("key") String key);

  @RequestLine("GET /api")
  List<V> list();

  @Headers("Content-Type: application/json")
  @RequestLine("PUT /api/{key}")
  void put(@Param("key") String key, V value);
}

interface FooApi extends BaseApi<Foo> { }

interface BarApi extends BaseApi<Bar> { }

Logging

You can log the http messages going to and from the target by setting up a Logger. Here's the easiest way to do that:

public class Example {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                     .decoder(new GsonDecoder())
                     .logger(new Logger.JavaLogger("GitHub.Logger").appendToFile("logs/http.log"))
                     .logLevel(Logger.Level.FULL)
                     .target(GitHub.class, "https://api.github.com");
  }
}

A Note on JavaLogger: Avoid using of default JavaLogger() constructor - it was marked as deprecated and will be removed soon.

The SLF4JLogger (see above) may also be of interest.

Request Interceptors

When you need to change all requests, regardless of their target, you'll want to configure a RequestInterceptor. For example, if you are acting as an intermediary, you might want to propagate the X-Forwarded-For header.

static class ForwardedForInterceptor implements RequestInterceptor {
  @Override public void apply(RequestTemplate template) {
    template.header("X-Forwarded-For", "origin.host.com");
  }
}

public class Example {
  public static void main(String[] args) {
    Bank bank = Feign.builder()
                 .decoder(accountDecoder)
                 .requestInterceptor(new ForwardedForInterceptor())
                 .target(Bank.class, "https://api.examplebank.com");
  }
}

Another common example of an interceptor would be authentication, such as using the built-in BasicAuthRequestInterceptor.

public class Example {
  public static void main(String[] args) {
    Bank bank = Feign.builder()
                 .decoder(accountDecoder)
                 .requestInterceptor(new BasicAuthRequestInterceptor(username, password))
                 .target(Bank.class, "https://api.examplebank.com");
  }
}

Custom @Param Expansion

Parameters annotated with Param expand based on their toString. By specifying a custom Param.Expander, users can control this behavior, for example formatting dates.

public interface Api {
  @RequestLine("GET /?since={date}") Result list(@Param(value = "date", expander = DateToMillis.class) Date date);
}

Dynamic Query Parameters

A Map parameter can be annotated with QueryMap to construct a query that uses the contents of the map as its query parameters.

public interface Api {
  @RequestLine("GET /find")
  V find(@QueryMap Map<String, Object> queryMap);
}

This may also be used to generate the query parameters from a POJO object using a QueryMapEncoder.

public interface Api {
  @RequestLine("GET /find")
  V find(@QueryMap CustomPojo customPojo);
}

When used in this manner, without specifying a custom QueryMapEncoder, the query map will be generated using member variable names as query parameter names. The following POJO will generate query params of "/find?name={name}&number={number}" (order of included query parameters not guaranteed, and as usual, if any value is null, it will be left out).

public class CustomPojo {
  private final String name;
  private final int number;

  public CustomPojo (String name, int number) {
    this.name = name;
    this.number = number;
  }
}

To setup a custom QueryMapEncoder:

public class Example {
  public static void main(String[] args) {
    MyApi myApi = Feign.builder()
                 .queryMapEncoder(new MyCustomQueryMapEncoder())
                 .target(MyApi.class, "https://api.hostname.com");
  }
}

When annotating objects with @QueryMap, the default encoder uses reflection to inspect provided objects Fields to expand the objects values into a query string. If you prefer that the query string be built using getter and setter methods, as defined in the Java Beans API, please use the BeanQueryMapEncoder

public class Example {
  public static void main(String[] args) {
    MyApi myApi = Feign.builder()
                 .queryMapEncoder(new BeanQueryMapEncoder())
                 .target(MyApi.class, "https://api.hostname.com");
  }
}

Error Handling

If you need more control over handling unexpected responses, Feign instances can register a custom ErrorDecoder via the builder.

public class Example {
  public static void main(String[] args) {
    MyApi myApi = Feign.builder()
                 .errorDecoder(new MyErrorDecoder())
                 .target(MyApi.class, "https://api.hostname.com");
  }
}

All responses that result in an HTTP status not in the 2xx range will trigger the ErrorDecoder's decode method, allowing you to handle the response, wrap the failure into a custom exception or perform any additional processing. If you want to retry the request again, throw a RetryableException. This will invoke the registered Retryer.

Retry

Feign, by default, will automatically retry IOExceptions, regardless of HTTP method, treating them as transient network related exceptions, and any RetryableException thrown from an ErrorDecoder. To customize this behavior, register a custom Retryer instance via the builder.

public class Example {
  public static void main(String[] args) {
    MyApi myApi = Feign.builder()
                 .retryer(new MyRetryer())
                 .target(MyApi.class, "https://api.hostname.com");
  }
}

Retryers are responsible for determining if a retry should occur by returning either a true or false from the method continueOrPropagate(RetryableException e); A Retryer instance will be created for each Client execution, allowing you to maintain state bewteen each request if desired.

If the retry is determined to be unsuccessful, the last RetryException will be thrown. To throw the original cause that led to the unsuccessful retry, build your Feign client with the exceptionPropagationPolicy() option.

Metrics

By default, feign won't collect any metrics.

But, it's possible to add metric collection capabilities to any feign client.

Metric Capabilities provide a first-class Metrics API that users can tap into to gain insight into the request/response lifecycle.

Dropwizard Metrics 4

public class MyApp {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                         .addCapability(new Metrics4Capability())
                         .target(GitHub.class, "https://api.github.com");

    github.contributors("OpenFeign", "feign");
    // metrics will be available from this point onwards
  }
}

Dropwizard Metrics 5

public class MyApp {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                         .addCapability(new Metrics5Capability())
                         .target(GitHub.class, "https://api.github.com");

    github.contributors("OpenFeign", "feign");
    // metrics will be available from this point onwards
  }
}

Micrometer

public class MyApp {
  public static void main(String[] args) {
    GitHub github = Feign.builder()
                         .addCapability(new MicrometerCapability())
                         .target(GitHub.class, "https://api.github.com");

    github.contributors("OpenFeign", "feign");
    // metrics will be available from this point onwards
  }
}

Static and Default Methods

Interfaces targeted by Feign may have static or default methods (if using Java 8+). These allows Feign clients to contain logic that is not expressly defined by the underlying API. For example, static methods make it easy to specify common client build configurations; default methods can be used to compose queries or define default parameters.

interface GitHub {
  @RequestLine("GET /repos/{owner}/{repo}/contributors")
  List<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);

  @RequestLine("GET /users/{username}/repos?sort={sort}")
  List<Repo> repos(@Param("username") String owner, @Param("sort") String sort);

  default List<Repo> repos(String owner) {
    return repos(owner, "full_name");
  }

  /**
   * Lists all contributors for all repos owned by a user.
   */
  default List<Contributor> contributors(String user) {
    MergingContributorList contributors = new MergingContributorList();
    for(Repo repo : this.repos(owner)) {
      contributors.addAll(this.contributors(user, repo.getName()));
    }
    return contributors.mergeResult();
  }

  static GitHub connect() {
    return Feign.builder()
                .decoder(new GsonDecoder())
                .target(GitHub.class, "https://api.github.com");
  }
}

Async execution via CompletableFuture

Feign 10.8 introduces a new builder AsyncFeign that allow methods to return CompletableFuture instances.

interface GitHub {
  @RequestLine("GET /repos/{owner}/{repo}/contributors")
  CompletableFuture<List<Contributor>> contributors(@Param("owner") String owner, @Param("repo") String repo);
}

public class MyApp {
  public static void main(String... args) {
    GitHub github = AsyncFeign.asyncBuilder()
                         .decoder(new GsonDecoder())
                         .target(GitHub.class, "https://api.github.com");

    // Fetch and print a list of the contributors to this library.
    CompletableFuture<List<Contributor>> contributors = github.contributors("OpenFeign", "feign");
    for (Contributor contributor : contributors.get(1, TimeUnit.SECONDS)) {
      System.out.println(contributor.login + " (" + contributor.contributions + ")");
    }
  }
}

Initial implementation include 2 async clients:

  • AsyncClient.Default
  • AsyncApacheHttp5Client
Comments
  • Move to a new org

    Move to a new org

    Netflix was the original sponsor of Feign, but it isn't used internally anymore. Plus, since we aren't in an org, we have no place to host things like jaxrs2 or other optional repositories.

    I think we have sufficient activity to carry-on, so should we move on to a new org?

    opened by codefromthecrypt 42
  • Support of Java8 Stream as Response.Body based on a Jackson Iterator Decoder, add an option to let the decoder close the response input stream itself

    Support of Java8 Stream as Response.Body based on a Jackson Iterator Decoder, add an option to let the decoder close the response input stream itself

    This first PR commit allows to stream only the response body in java8 way and take benefit of Jackson token parser to decode.

    I have also tried to stream request body based on InputStream as suggested by @spencergibb on #220. But it requires additional changes on the core and maybe not appropriate implementation. You can have a look on this fork. @adriancole Please tell if it is eligible to another PR or should be included in this one or cancelled.

    Fixes #514.

    opened by phymbert 39
  • 400 returning when calling elasticsearch from feign

    400 returning when calling elasticsearch from feign

    So I have a basic request to a locally running instance of elasticsearch

        @RequestLine("GET /_search?q=body:{body}")
        public ElasticGetResponse getResumes(@Param("body") String body);
    

    Here is what I get through the logger:

    [ElasticSearchService#getResumes] ---> GET http://localhost:9200/_search?q=body%3A%7Bbody%7D HTTP/1.1
    [ElasticSearchService#getResumes] Content-Length: 21
    [ElasticSearchService#getResumes] 
    [ElasticSearchService#getResumes] {
      "body" : "phil"
    }
    [ElasticSearchService#getResumes] ---> END HTTP (21-byte body)
    [ElasticSearchService#getResumes] <--- HTTP/1.1 400 Bad Request (154ms)
    [ElasticSearchService#getResumes] Content-Length: 470
    [ElasticSearchService#getResumes] Content-Type: application/json; charset=UTF-8
    [ElasticSearchService#getResumes] 
    [ElasticSearchService#getResumes] {"error":{"root_cause":    [{"type":"search_parse_exception","reason":"failed to parse search source. unknown search element [body]","line":2,"col":3}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"1","node":"rOGZzEghRVacdIRh_E9Wog","reason":{"type":"search_parse_exception","reason":"failed to parse search source. unknown search element [body]","line":2,"col":3}}]},"status":400}
    [ElasticSearchService#getResumes] <--- END HTTP (470-byte body)
    

    Now of course I dont get the problem when I curl the same endpoint

    curl 'http://localhost:9200/_search?q=body:phil'
    

    returns the correct docs

    My question is why does feign hate that colon? When I have _search?q=phil it works....

    bug 
    opened by jaylucas 31
  • Support Object Query with GET request

    Support Object Query with GET request

    Let's say you have two mandatory parameters and an optional parameters, you will have to implement it this way:

    foo(m1, m2, o1)
    

    If you have more optional parameters you will have to implement a lot of overloaded methods, otherwise you can only implement a method with a lot of parameters and when it is called, you have to pass in a bunch of null values like this:

    foo(m1, m2, null, null, null, null, o5, null, null, o8) 
    

    This is very ugly, if we have object parameter we can do this: first, use a constructor to pass in all mandatory parameters, then use setters to set the optional parameters like this:

    q = new FindUsersRequest(category, type);
    q.setRowStart(10);
    q.setGender(M);
    feign.findUsers(q);
    
    

    Relaated to #520

    enhancement waiting for feedback 
    opened by DanielYWoo 30
  • Support parameterized base apis

    Support parameterized base apis

    Consider the example:

    public interface BaseAPI {
         @RequestLine("GET /health")
         String health();
         @RequestLine("GET /all")
         List<Entity> all();
    }
    

    And then some specific API:

    public interface CustomAPI extends BaseAPI {
         @RequestLine("GET /custom")
         String custom();
    }
    

    I'd like to use CustomAPI when creating Feign client and be able to access methods of the BaseAPI.

    Currently only methods defined directly in the CustomAPI are bound to handlers.

    It looks like the only required changes to be made are:

    1 feign.Contract.BaseContract.parseAndValidatateMetadata(Class<?> declaring):

    //      for (Method method : declaring.getDeclaredMethods()) {
          for (Method method : declaring.getMethods()) {
    

    2 feign.ReflectiveFeign.newInstance(Target<T> target):

    //    for (Method method : target.type().getDeclaredMethods()) {
        for (Method method : target.type().getMethods()) {
    

    I was able to get the required functionality with the above changes. Would be great to have this functionality either out of the box or easily configurable.

    opened by alexeos 23
  • OptionalAwareDecoder in feign core?

    OptionalAwareDecoder in feign core?

    Hej again, How are the chances of getting a "feign-guava-optional" module (or similar) into feign that knows about 404-decoding Guava Optional? Such a module would have a Guava dependency and only make sense where decode404 is enabled. R.

    /**
     * Decorates a Feign {@link Decoder} such that it returns {@link Optional#absent} when observing an HTTP 404 error code
     * for a method with {@link Type} {@link Optional}. Propagates the exception returned by the given {@link ErrorDecoder}
     * in case the response is 404 for a non-Optional method.
     */
    public final class OptionalAwareDecoder implements Decoder {
    
        private final Decoder delegate;
        private final ErrorDecoder errorDecoder;
    
        public OptionalAwareDecoder(Decoder delegate, ErrorDecoder errorDecoder) {
            this.delegate = delegate;
            this.errorDecoder = errorDecoder;
        }
    
        @Override
        public Object decode(Response response, Type type) throws IOException, FeignException {
            if (response.status() == 404) {
                if (Types.getRawType(type).equals(Optional.class)) {
                    return Optional.absent();
                } else {
                    throw Throwables.propagate(errorDecoder.decode(null, response));
                }
            } else {
                return delegate.decode(response, type);
            }
        }
    }
    
    opened by uschi2000 22
  • issue 361 - async feign variant supporting CompleteableFutures

    issue 361 - async feign variant supporting CompleteableFutures

    Adds CompleteableFuture support. The targeted API must be an interface, where each method has a return type of CompleteableFuture for some type T which can be decoded by the configured decoder.

    Context is explicit, providing support for sessions. A default synchronous -> asynchronous client is provided, although the different modules should add their own implementations of AsyncClient.

    Retry is not supported - in particular, there can be many different ways one could handle the threading (scheduling the try on an appropriate thread). resilience4j could be an option, in particular to provide a wrapper to AsyncClient.

    enhancement waiting for votes documentation ready to merge 
    opened by motinis 21
  • Support kotlin coroutines

    Support kotlin coroutines

    Resolves: #1565

    !! This is working PoC

    Inspired by https://github.com/PlaytikaOSS/feign-reactive/pull/486

    TODO

    • [x] Separate Kotlin support module
    • [x] Enhance test case
    • [x] Refactoring
    • [x] Clean up pom.xml
    enhancement ready to merge 
    opened by wplong11 20
  • Illegal reflective access by feign.DefaultMethodHandler in Java 11

    Illegal reflective access by feign.DefaultMethodHandler in Java 11

    Similar to #393

    This can be reproduced on Java 11 (probably also 9 and 10) with the Github example after renaming the package to notfeign.example.github (or anything that isn't under feign.*). Can be compiled with Java 8 or 11 (the compiler doesn't complain either way).

    I reproduced on Zulu and Corretto 11.0.2 (all OpenJDK 11 implementations should behave the same):

    $ java -version
    openjdk version "11.0.2" 2019-01-15 LTS
    OpenJDK Runtime Environment Zulu11.29+3-CA (build 11.0.2+7-LTS)
    OpenJDK 64-Bit Server VM Zulu11.29+3-CA (build 11.0.2+7-LTS, mixed mode)
    
    $ java -version
    openjdk version "11.0.2" 2019-01-15 LTS
    OpenJDK Runtime Environment Corretto-11.0.2.9.1 (build 11.0.2+9-LTS)
    OpenJDK 64-Bit Server VM Corretto-11.0.2.9.1 (build 11.0.2+9-LTS, mixed mode)
    
    $ java -jar target/feign-example-github-10.2.1-SNAPSHOT.jar
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by feign.DefaultMethodHandler (file:/Users/gavin/test/feign/example-github/target/feign-example-github-10.2.1-SNAPSHOT.jar) to field java.lang.invoke.MethodHandles$Lookup.IMPL_LOOKUP
    WARNING: Please consider reporting this to the maintainers of feign.DefaultMethodHandler
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    Let's fetch and print a list of the contributors to this org.
    [GitHub#repos] ---> GET https://api.github.com/users/openfeign/repos?sort=full_name HTTP/1.1
    [GitHub#repos] <--- HTTP/1.1 200 OK (554ms)
    ...
    

    Note that using the --illegal-access=warn JVM option just changes the warning to just the single line calling out feign.DefaultMethodHandler.

    It seems like fixing this while maintaining compatibility for older Java versions will not be fun. Refs:

    https://blog.jooq.org/2018/03/28/correct-reflective-access-to-interface-default-methods-in-java-8-9-10/

    https://mydailyjava.blogspot.com/2018/04/jdk-11-and-proxies-in-world-past.html

    documentation feign-12 
    opened by gavinws 20
  • Halt all feature development until someone is doing at least patch releases

    Halt all feature development until someone is doing at least patch releases

    Our issues list is backing up, and some of the requested change will have maintenance impact, which there's also little help on. We need to decide whether to continue this project at all. It matters not if folks want it, if no-one is ready to do it.

    Personally, I have no time to merge major features, sadly. I won't merge things that are not in (what I consider to be) good shape or create new classes of bugs. This puts me in a bad spot because often change needs significant multi-day effort to get into such a state. I don't have the time or will to do this anymore for reasons including being overcommitted. When I do, it makes me even more stressed out, so sorry I can't do it anymore. It isn't you, it's me.

    So, what's the impact? Someone else will be either merging and releasing code, or we should close the project or let it move somewhere else. I cannot offer help merging change anymore, but I can offer help in getting someone access and teaching them how to do that.

    For folks who are up to the task! HACKING file roughly describes the culture which effective java also influences. This was put together to prevent the largest amount of bugs and the least api breakage when introducing change. This is why spring was able to include feign in project work like spring cloud (not fear apis will break or change willy nilly). If this project is resumed, and the change culture is otherwise, bear in mind that this may limit the ability for others to support feign. This may nullify some of the goals of even proceeding. For this reason, whoever that takes over (if it is taken over), will need to think carefully about this, as damage caused by not well planned change or interface design have knock-on effects to anyone using the project. The ideal leaders of this project will be very nervous, especially about public facing api change or features that require java versions, or careful resource management. A different change culture can also be the case, but if that is I'd recommend a different group ID so that others aren't broken when things are merged otherwise.

    The TL;DR; frankly, this project is at a point of stagnation; I won't be running in gallantly to save it. Someone else needs to be that. If not, we should do as sometimes is done in apache. Set a timeout for attic'ing the project. If that happens attic it and recommend an alternative such as retrofit which is still quite healthy.

    Over to you.. If you have opinions on the matter or impact, please reply back.

    opened by codefromthecrypt 20
  • Support GET request with query parameters from map

    Support GET request with query parameters from map

    Currently, Feign does not provide native support for making a GET request with dynamic query parameters and values using a map. It would be great if there was a mechanism for providing a Map or Multimap of Strings whose contents would be used as the query parameters for a GET call.

    I have a work-around using encoders as a PR in a different repository at https://github.com/palantir/http-remoting/pull/53, but wanted to open this issue to see if it would be possible to implement this directly in Feign.

    opened by nmiyake 20
  • build(deps): bump mockito-core from 4.10.0 to 4.11.0

    build(deps): bump mockito-core from 4.10.0 to 4.11.0

    Bumps mockito-core from 4.10.0 to 4.11.0.

    Release notes

    Sourced from mockito-core's releases.

    v4.11.0

    Changelog generated by Shipkit Changelog Gradle Plugin

    4.11.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • build(deps): bump kotlin.version from 1.7.22 to 1.8.0

    build(deps): bump kotlin.version from 1.7.22 to 1.8.0

    Bumps kotlin.version from 1.7.22 to 1.8.0. Updates kotlin-stdlib-jdk8 from 1.7.22 to 1.8.0

    Release notes

    Sourced from kotlin-stdlib-jdk8's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from kotlin-stdlib-jdk8's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Updates kotlin-reflect from 1.7.22 to 1.8.0

    Release notes

    Sourced from kotlin-reflect's releases.

    Kotlin 1.8.0

    Changelog

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend

    ... (truncated)

    Changelog

    Sourced from kotlin-reflect's changelog.

    1.8.0

    Analysis API

    • KT-50255 Analysis API: Implement standalone mode for the Analysis API

    Analysis API. FIR

    • KT-54292 Symbol Light classes: implement PsiVariable.computeConstantValue for light field
    • KT-54293 Analysis API: fix constructor symbol creation when its accessed via type alias

    Android

    • KT-53342 TCS: New AndroidSourceSet layout for multiplatform
    • KT-53013 Increase AGP compile version in KGP to 4.1.3
    • KT-54013 Report error when using deprecated Kotlin Android Extensions compiler plugin
    • KT-53709 MPP, Android SSL2: Conflicting warnings for androidTest/kotlin source set folder

    Backend. Native. Debug

    • KT-53561 Invalid LLVM module: "inlinable function call in a function with debug info must have a !dbg location"

    Compiler

    New Features

    • KT-52817 Add @JvmSerializableLambda annotation to keep old behavior of non-invokedynamic lambdas
    • KT-54460 Implementation of non-local break and continue
    • KT-53916 Support Xcode 14 and new Objective-C frameworks in Kotlin/Native compiler
    • KT-32208 Generate method annotations into bytecode for suspend lambdas (on invokeSuspend)
    • KT-53438 Introduce a way to get SourceDebugExtension attribute value via JVMTI for profiler and coverage

    Performance Improvements

    • KT-53347 Get rid of excess allocations in parser
    • KT-53689 JVM: Optimize equality on class literals
    • KT-53119 Improve String Concatenation Lowering

    Fixes

    • KT-53465 Unnecessary checkcast to array of reified type is not optimized since Kotlin 1.6.20
    • KT-49658 NI: False negative TYPE_MISMATCH on nullable type with when
    • KT-48162 NON_VARARG_SPREAD isn't reported on *toTypedArray() call
    • KT-43493 NI: False negative: no compilation error "Operator '==' cannot be applied to 'Long' and 'Int'" is reported in builder inference lambdas
    • KT-54393 Change in behavior from 1.7.10 to 1.7.20 for java field override.
    • KT-55357 IllegalStateException when reading a class that delegates to a Java class with a definitely-not-null type with a flexible upper bound
    • KT-55068 Kotlin Gradle DSL: No mapping for symbol: VALUE_PARAMETER SCRIPT_IMPLICIT_RECEIVER on JVM IR backend
    • KT-51284 SAM conversion doesn't work if method has context receivers
    • KT-48532 Remove old JVM backend
    • KT-55065 Kotlin Gradle DSL: Reflection cannot find class data for lambda, produced by JVM IR backend

    ... (truncated)

    Commits
    • da1a843 Add ChangeLog for 1.8.0-RC2
    • d325cf8 Call additional publishToMavenLocal in maven build scripts and enable info
    • 0403d70 Don't leave Gradle daemons after build scripts
    • 52b225d Fix task module-name is not propagated to compiler arguments
    • d40ebc3 Specify versions-maven-plugin version explicitly
    • 2e829ed Fix version parsing crash on Gradle rich version string
    • f603c0e Scripting, IR: fix capturing of implicit receiver
    • 06cbf8f Scripting, tests: enable custom script tests with IR
    • d61cef0 Fix deserialization exception for DNN types from Java
    • ea33e72 JVM IR: script is a valid container for local delegated properties
    • Additional commits viewable in compare view

    Updates kotlin-maven-plugin from 1.7.22 to 1.8.0

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • two different requests get the same result

    two different requests get the same result

    In the course of applying feign, two different requests get the same result. service A invoke service B Only one request was received on service B.

    service A log request one 2022-12-26 08:57:01.574 - traceId[] [http-nio-18003-exec-3] INFO {"code":"200","data":{"scaRecId":1607178636649340928} request two 2022-12-26 08:57:01.578 - traceId[] [http-nio-18003-exec-11] INFO {"code":"200","data":{"scaRecId":1607178636649340928}

    service B log 2022-12-26 08:57:01.566 - traceId[] [http-nio-10087-exec-10] INFO "id":1607178636636758016 【 this response missed】 2022-12-26 08:57:01.569 - traceId[] [http-nio-10087-exec-9] INFO "id":1607178636649340928 This id is the primary key id of the mysql table

    Why is this return confusing???

    opened by China-Dwan 1
  • Different Trace ID for same request in two services

    Different Trace ID for same request in two services

    Hi,

    I am trying to achieve distributed tracing using micrometer and for inter service communication I'm using Feign Client. But when I try to call Service A and Service A is making a internal call to Service B, I get different trace id's in the services. But when I use rest template instead of feign client I get the same trace id. I think feign client is not propagating the trace id to the other service.

    I have following dependencies in my pom.xml file and I'm using spring boot 3.0.0-snapshot. `

    	<dependency>
    		<groupId>org.springframework.cloud</groupId>
    		<artifactId>spring-cloud-starter-openfeign</artifactId>
    		<version>3.1.5</version>
    	</dependency>
    	<dependency>
    		<groupId>io.github.openfeign</groupId>
    		<artifactId>feign-micrometer</artifactId>
    		<version>12.1</version>
    		<scope>test</scope>
    	</dependency>
    	<dependency>
    		<groupId>io.micrometer</groupId>
    		<artifactId>micrometer-tracing-bridge-brave</artifactId>
    	</dependency>
    	<dependency>
    		<groupId>io.zipkin.reporter2</groupId>
    		<artifactId>zipkin-reporter-brave</artifactId>
    	</dependency>
    

    `

    This is my feign client.

    @FeignClient(name = "registration-onboarding-service", path = "/applicant") public interface RegistrationClient {

    @GetMapping("/{uId}")
    UserResponse find(@PathVariable String uId);
    

    }

    And this is the way I'm calling the find method using the client created.

    @Autowired
    private RegistrationClient registrationClient;
    

    UserResponse userResponse = registrationClient.find(product.getUserId());

    opened by deadpool1418 0
  • Performance issues with Feign?

    Performance issues with Feign?

    Hi,

    Has anyone experienced performance issues with Feign?

    Our company is using Feign with most of our web services. New requirements demand one of our services to handle at least 3000 transactions per second (TPS). So for the past few weeks my team have been performance testing with different code config and infrastructure. We stripped all logic without luck, but once we removed Feign and used pure okHttp3 HTTP clients with http/2 protocol, the performance skyrocketed.

    We went from constantly starting to fail around 1500 TPS, independent of pods and resources, to managing 8000 TPS. With Feign we also see a boost of Java threads when we get close the threshold of 1500 TPS.

    Are we configuring Feign wrong? (see config example at the bottom)

    Background info

    Infrastructure

    • Web services are running on kubernetes - on premise
    • Containers
    • Resources examples:
      • Tried 512MB - 4 GB memory
      • 2, 4, 8 CPU cores
      • Pods: 2, 8, 12, 20
      • Heap Size: 128MB - 2GB

    Code

    • Java 11
    • Spring Boot 2
    • Feign with all HTTP clients
    • okHttp3 and java.net.Client HTTP clients
    • Http/2 protocol

    Example Feign with okHttp3 client

    OkHttpClient.Builder builder = new OkHttpClient.Builder()
            .protocols(List.of(Protocol.HTTP_2, Protocol.HTTP_1_1))
            .followRedirects(true)
            .connectTimeout(Duration.ofSeconds(10))
            .readTimeout(Duration.ofSeconds(10))
            .retryOnConnectionFailure(false);
            
    OkHttpClient http2Client = new OkHttpClient(builder);
    
    return Feign.builder()
            .logger(new FeignNTLogger())
            .logLevel(Logger.Level.FULL)
            .client(http2Client)
            .addCapability(new MicrometerCapability(meterRegistry))
            .encoder(new JacksonEncoder(objectMapper))
            .retryer(Retryer.NEVER_RETRY)
            .decoder(new JacksonDecoder(objectMapper))
            .errorDecoder(new WalletApiErrorDecoder(objectMapper))
            .options(new Request.Options(10, TimeUnit.SECONDS, 10, TimeUnit.SECONDS, true))
            .target(WithdrawApi.class, url);
    
    opened by petterasla 1
  • Log HTTP body, not headers

    Log HTTP body, not headers

    It could be useful to allow logging of HTTP body but not headers.

    In some cases, headers contains restricted / confidential information such as usernames, passwords, tokens, so you don't want to write them to logs. Whilst HTTP body could contribute useful information.

    Actually feign.Logger doesn't have a feign.Logger.Level allowing to configure logging of HTTP body but no headers.

    To do that you could create feign.Logger subclass, and rewrite logRequest and logAndRebufferResponse methods.

    opened by leaqui 0
Releases(12.1)
  • 12.1(Nov 18, 2022)

    What's Changed

    • Allow usage of GET with body in java11 Module by @f-cramer in https://github.com/OpenFeign/feign/pull/1819
    • Support retry cancel feature fully for AsyncFeign by @wplong11 in https://github.com/OpenFeign/feign/pull/1801
    • Refactor reflective feign by @wplong11 in https://github.com/OpenFeign/feign/pull/1821
    • Refactor method signature of MethodHandler.Factory.create by @wplong11 in https://github.com/OpenFeign/feign/pull/1822
    • Micrometer Observations by @marcingrzejszczak in https://github.com/OpenFeign/feign/pull/1760
    • Allow using SOAPEncoder constructor taking builder by @Nicklas2751 in https://github.com/OpenFeign/feign/pull/1841

    List of PRs that updated libraries versions
    * build(deps): bump spring-cloud-dependencies from 2021.0.4 to 2021.0.5 by @dependabot in https://github.com/OpenFeign/feign/pull/1823 * build(deps): bump jackson-databind.version from 2.14.0-rc3 to 2.14.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1824 * build(deps-dev): bump jackson-databind from 2.14.0-rc3 to 2.14.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1825 * build(deps): bump micrometer-core from 1.9.5 to 1.10.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1826 * build(deps): bump kotlin.version from 1.7.20 to 1.7.21 by @dependabot in https://github.com/OpenFeign/feign/pull/1830 * build(deps): bump netty.version from 4.1.84.Final to 4.1.85.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1831 * Issue-1833: Bump Sundr Maven Plugin by @JKomoroski in https://github.com/OpenFeign/feign/pull/1834 * build(deps): bump httpclient5 from 5.1.3 to 5.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1836 * build(deps): bump jmh.version from 1.35 to 1.36 by @dependabot in https://github.com/OpenFeign/feign/pull/1837 * build(deps): bump mockito-core from 4.8.1 to 4.9.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1838 * build(deps): bump micrometer.version from 1.10.0 to 1.10.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1842 * build(deps): bump maven-install-plugin from 3.0.1 to 3.1.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1847 * build(deps): bump slf4j.version from 2.0.3 to 2.0.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1845 * build(deps-dev): bump spring-context from 5.3.23 to 5.3.24 by @dependabot in https://github.com/OpenFeign/feign/pull/1846

    New Contributors

    • @f-cramer made their first contribution in https://github.com/OpenFeign/feign/pull/1819
    • @marcingrzejszczak made their first contribution in https://github.com/OpenFeign/feign/pull/1760
    • @Nicklas2751 made their first contribution in https://github.com/OpenFeign/feign/pull/1841

    Full Changelog: https://github.com/OpenFeign/feign/compare/12.0...12.1

    Source code(tar.gz)
    Source code(zip)
  • 12.0(Oct 31, 2022)

    What's Changed

    • Support kotlin coroutines by @wplong11 in https://github.com/OpenFeign/feign/pull/1706
    • Refactor async feign by @wplong11 in https://github.com/OpenFeign/feign/pull/1755
    • Add methodInfoResolver attribute to Coroutinebuilder by @wplong11 in https://github.com/OpenFeign/feign/pull/1762
    • [GH-1464] Add appendHeader that supports Literals by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1781
    • Fixes missing Content-Length header when body is empty by @c00ler in https://github.com/OpenFeign/feign/pull/1778
    • Implement a Regex based Check on Expressions by @JKomoroski in https://github.com/OpenFeign/feign/pull/1776
    • Create example that uses springboot by @velo in https://github.com/OpenFeign/feign/pull/1782
    • Add retry feature to async feign by @wplong11 in https://github.com/OpenFeign/feign/pull/1757
    • Issue #1606 Customize the length of the body in FeignException builder by @coungard in https://github.com/OpenFeign/feign/pull/1767
    • Bump versions by @velo in https://github.com/OpenFeign/feign/pull/1814
    • Remove the unused code from the MethodInfo by @wplong11 in https://github.com/OpenFeign/feign/pull/1785
    • Change some access modifier by @wplong11 in https://github.com/OpenFeign/feign/pull/1784
    • Refactor AsyncFeign by @wplong11 in https://github.com/OpenFeign/feign/pull/1789
    • Eliminates unnecessary overhead by @wplong11 in https://github.com/OpenFeign/feign/pull/1786
    • Fix false negative test case for AsyncFeign Retry feature by @wplong11 in https://github.com/OpenFeign/feign/pull/1795
    • Exchange "Produces" and "Consumes" by @chengda in https://github.com/OpenFeign/feign/pull/1772
    • Add Unit Test For Json Literals Being Passed as Header Values by @JKomoroski in https://github.com/OpenFeign/feign/pull/1800

    List of PRs that updated libraries versions
    • build(deps): bump micrometer-core from 1.9.3 to 1.9.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1746
    • build(deps): bump netty.version from 4.1.80.Final to 4.1.81.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1745
    • build(deps): bump reactor.version from 3.4.22 to 3.4.23 by @dependabot in https://github.com/OpenFeign/feign/pull/1748
    • build(deps): bump netty.version from 4.1.81.Final to 4.1.82.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1747
    • build(deps): bump slf4j.version from 1.7.36 to 2.0.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1730
    • build(deps): bump slf4j.version from 2.0.0 to 2.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1751
    • build(deps): bump maven-shade-plugin from 3.3.0 to 3.4.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1752
    • build(deps): bump kotlin.version from 1.6.20 to 1.7.10 by @dependabot in https://github.com/OpenFeign/feign/pull/1750
    • build(deps-dev): bump slf4j-jdk14 from 2.0.0 to 2.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1749
    • build(deps): bump maven-jar-plugin from 3.2.2 to 3.3.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1759
    • build(deps-dev): bump spring-context from 5.3.22 to 5.3.23 by @dependabot in https://github.com/OpenFeign/feign/pull/1753
    • build(deps-dev): bump jaxb-core from 4.0.0 to 4.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1765
    • build(deps): bump slf4j.version from 2.0.1 to 2.0.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1763
    • build(deps): bump json from 20220320 to 20220924 by @dependabot in https://github.com/OpenFeign/feign/pull/1768
    • build(deps): bump slf4j.version from 2.0.2 to 2.0.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1769
    • build(deps): bump kotlin.version from 1.7.10 to 1.7.20 by @dependabot in https://github.com/OpenFeign/feign/pull/1771
    • build(deps): bump asm from 9.3 to 9.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1777
    • Bump jackson version to fix security issue by @velo in https://github.com/OpenFeign/feign/pull/1783
    • build(deps): bump jackson-databind.version from 2.14.0-rc1 to 2.14.0-rc2 by @dependabot in https://github.com/OpenFeign/feign/pull/1790
    • build(deps): bump micrometer-core from 1.9.4 to 1.9.5 by @dependabot in https://github.com/OpenFeign/feign/pull/1792
    • build(deps-dev): bump jackson-databind from 2.14.0-rc1 to 2.14.0-rc2 by @dependabot in https://github.com/OpenFeign/feign/pull/1791
    • build(deps): bump netty.version from 4.1.82.Final to 4.1.84.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1793
    • build(deps): bump reactor.version from 3.4.23 to 3.4.24 by @dependabot in https://github.com/OpenFeign/feign/pull/1794
    • build(deps): bump handlebars from 4.3.0 to 4.3.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1797
    • build(deps): bump mockito-core from 4.8.0 to 4.8.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1804
    • build(deps): bump versions-maven-plugin from 2.12.0 to 2.13.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1805
    • build(deps): bump gson from 2.9.1 to 2.10 by @dependabot in https://github.com/OpenFeign/feign/pull/1806
    • build(deps-dev): bump jackson-databind from 2.14.0-rc2 to 2.14.0-rc3 by @dependabot in https://github.com/OpenFeign/feign/pull/1813
    • build(deps): bump maven-shade-plugin from 3.4.0 to 3.4.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1809
    • improve doc about using @Param on @QueryMap pojo by @manoelstilpen in https://github.com/OpenFeign/feign/pull/1803
    • Fix case for Java by @velo in https://github.com/OpenFeign/feign/pull/1816

    New Contributors

    • @wplong11 made their first contribution in https://github.com/OpenFeign/feign/pull/1706
    • @c00ler made their first contribution in https://github.com/OpenFeign/feign/pull/1778
    • @JKomoroski made their first contribution in https://github.com/OpenFeign/feign/pull/1776
    • @coungard made their first contribution in https://github.com/OpenFeign/feign/pull/1767
    • @chengda made their first contribution in https://github.com/OpenFeign/feign/pull/1772
    • @manoelstilpen made their first contribution in https://github.com/OpenFeign/feign/pull/1803

    Full Changelog: https://github.com/OpenFeign/feign/compare/11.10...12.0

    Source code(tar.gz)
    Source code(zip)
  • 11.10(Sep 21, 2022)

    What's Changed

    • Proof that clients support gzip and deflate compression by @radio-rogal in https://github.com/OpenFeign/feign/pull/1713
    • Pass exception parameter to overloaded method in FeignMetricTagResolver by @eshishkin in https://github.com/OpenFeign/feign/pull/1720
    • Only allow a single content-type header to be applied while using googlehttpclient by @skrzepto in https://github.com/OpenFeign/feign/pull/1737

    List of PRs that updated libraries versions
    • build(deps): bump maven-install-plugin from 3.0.0 to 3.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1701
    • build(deps): bump maven-bundle-plugin from 5.1.7 to 5.1.8 by @dependabot in https://github.com/OpenFeign/feign/pull/1707
    • build(deps): bump gson from 2.9.0 to 2.9.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1708
    • build(deps): bump metrics-core from 4.2.10 to 4.2.11 by @dependabot in https://github.com/OpenFeign/feign/pull/1712
    • build(deps): bump micrometer-core from 1.9.2 to 1.9.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1719
    • build(deps-dev): bump jersey-client from 2.26 to 2.36 by @dependabot in https://github.com/OpenFeign/feign/pull/1718
    • build(deps-dev): bump jersey-hk2 from 2.26 to 2.36 by @dependabot in https://github.com/OpenFeign/feign/pull/1717
    • build(deps): bump reactor.version from 3.4.21 to 3.4.22 by @dependabot in https://github.com/OpenFeign/feign/pull/1722
    • build(deps): bump mockito-core from 4.6.1 to 4.7.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1724
    • build(deps): bump maven-javadoc-plugin from 3.4.0 to 3.4.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1725
    • build(deps): bump animal-sniffer-maven-plugin from 1.21 to 1.22 by @dependabot in https://github.com/OpenFeign/feign/pull/1728
    • build(deps-dev): bump slf4j-jdk14 from 1.7.36 to 2.0.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1729
    • build(deps): bump netty.version from 4.1.79.Final to 4.1.80.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1735
    • build(deps-dev): bump jackson-databind from 2.13.3 to 2.13.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1738
    • build(deps): bump metrics-core from 4.2.11 to 4.2.12 by @dependabot in https://github.com/OpenFeign/feign/pull/1739
    • build(deps-dev): bump jersey-hk2 from 2.36 to 2.37 by @dependabot in https://github.com/OpenFeign/feign/pull/1742
    • build(deps-dev): bump jersey-client from 2.36 to 2.37 by @dependabot in https://github.com/OpenFeign/feign/pull/1743
    • build(deps): bump versions-maven-plugin from 2.11.0 to 2.12.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1741
    • build(deps): bump jackson.version from 2.13.3 to 2.13.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1740
    • build(deps): bump mockito-core from 4.7.0 to 4.8.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1744

    New Contributors

    • @eshishkin made their first contribution in https://github.com/OpenFeign/feign/pull/1720
    • @skrzepto made their first contribution in https://github.com/OpenFeign/feign/pull/1737

    Full Changelog: https://github.com/OpenFeign/feign/compare/11.9.1...11.10

    Source code(tar.gz)
    Source code(zip)
  • 11.9.1(Jul 21, 2022)

    What's Changed

    • Restore bytcode compatibility by @velo in https://github.com/OpenFeign/feign/pull/1689
    • Use enforcer plugin to guarantee core is free from dependencies by @velo in https://github.com/OpenFeign/feign/pull/1655
    • Jakarta annotations support by @Hrozhek in https://github.com/OpenFeign/feign/pull/1649
    • Run CI with java 17 by @velo in https://github.com/OpenFeign/feign/pull/1656

    List of PRs that updated libraries versions
    • [Snyk] Upgrade org.bouncycastle:bcprov-jdk15on from 1.69 to 1.70 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1556
    • [Snyk] Security upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.0 to 2.13.1 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1558
    • [Snyk] Upgrade org.openjdk.jmh:jmh-core from 1.33 to 1.34 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1567
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.70.Final to 4.1.72.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1564
    • [Snyk] Upgrade org.slf4j:slf4j-api from 1.7.32 to 1.7.33 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1573
    • [Snyk] Upgrade org.slf4j:slf4j-nop from 1.7.33 to 1.7.35 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1574
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.72.Final to 4.1.73.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1572
    • [Snyk] Upgrade org.slf4j:slf4j-api from 1.7.35 to 1.7.36 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1582
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.73.Final to 4.1.74.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1584
    • [Snyk] Upgrade com.google.code.gson:gson from 2.8.9 to 2.9.0 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1589
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.3.0.RELEASE to 3.4.14 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1587
    • [Snyk] Upgrade io.reactivex.rxjava2:rxjava from 2.2.14 to 2.2.21 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1588
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.14 to 3.4.15 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1596
    • [Snyk] Upgrade org.openjdk.jmh:jmh-generator-annprocess from 1.34 to 1.35 by @velo in https://github.com/OpenFeign/feign/pull/1607
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.15 to 3.4.16 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1605
    • [Snyk] Upgrade io.netty:netty-handler from 4.1.74.Final to 4.1.75.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1604
    • [Snyk] Upgrade io.netty:netty-handler from 4.1.75.Final to 4.1.76.Final by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1616
    • [Snyk] Fix for 1 vulnerabilities by @velo in https://github.com/OpenFeign/feign/pull/1618
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.16 to 3.4.17 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1615
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.17 to 3.4.18 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1625
    • [Snyk] Upgrade org.reactivestreams:reactive-streams from 1.0.3 to 1.0.4 by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1632
    • build(deps-dev): bump jackson-databind from 2.13.1 to 2.13.2.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1614
    • [Snyk] Upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.2 to 2.13.3 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1633
    • Alternative ResponseInterceptor attempt by @velo in https://github.com/OpenFeign/feign/pull/1634
    • build(deps): bump maven-shade-plugin from 2.4.3 to 3.3.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1640
    • build(deps): bump maven-source-plugin from 3.0.1 to 3.2.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1642
    • build(deps): bump centralsync-maven-plugin from 0.1.0 to 0.1.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1643
    • build(deps): bump nexus-staging-maven-plugin from 1.6.8 to 1.6.13 by @dependabot in https://github.com/OpenFeign/feign/pull/1639
    • build(deps): bump metrics-core from 4.2.9 to 4.2.10 by @dependabot in https://github.com/OpenFeign/feign/pull/1644
    • build(deps): bump animal-sniffer-maven-plugin from 1.17 to 1.21 by @dependabot in https://github.com/OpenFeign/feign/pull/1647
    • build(deps): bump micrometer-core from 1.3.5 to 1.9.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1646
    • build(deps): bump reactor.version from 3.4.18 to 3.4.19 by @dependabot in https://github.com/OpenFeign/feign/pull/1648
    • build(deps): bump asm from 9.2 to 9.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1645
    • build(deps): bump guava from 30.1.1-jre to 31.1-jre by @dependabot in https://github.com/OpenFeign/feign/pull/1651
    • build(deps): bump versions-maven-plugin from 2.7 to 2.11.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1652
    • build(deps-dev): bump slf4j-jdk14 from 1.7.25 to 1.7.36 by @dependabot in https://github.com/OpenFeign/feign/pull/1654
    • build(deps): bump maven-bundle-plugin from 5.1.2 to 5.1.6 by @dependabot in https://github.com/OpenFeign/feign/pull/1653
    • build(deps): bump maven-surefire-plugin.version from 2.22.0 to 2.22.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1650
    • build(deps): bump maven from 0.3.4 to 0.7.7 by @dependabot in https://github.com/OpenFeign/feign/pull/1659
    • build(deps): bump maven-gpg-plugin from 1.6 to 3.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1662
    • build(deps-dev): bump jersey-client from 1.19 to 1.19.4 by @dependabot in https://github.com/OpenFeign/feign/pull/1660
    • build(deps): bump sortpom-maven-plugin from 2.8.0 to 3.1.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1663
    • build(deps): bump maven-javadoc-plugin from 3.0.1 to 3.4.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1664
    • build(deps): bump netty.version from 4.1.77.Final to 4.1.78.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1665
    • build(deps): bump httpclient5 from 5.0.3 to 5.1.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1667
    • Revert "build(deps): bump sortpom-maven-plugin from 2.8.0 to 3.1.3" by @velo in https://github.com/OpenFeign/feign/pull/1675
    • build(deps): bump maven-compiler-plugin from 3.8.0 to 3.10.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1674
    • build(deps): bump assertj-core from 3.21.0 to 3.23.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1672
    • build(deps): bump json from 20210307 to 20220320 by @dependabot in https://github.com/OpenFeign/feign/pull/1677
    • build(deps): bump maven-scm-plugin from 1.11.2 to 1.13.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1676
    • build(deps-dev): bump jsonassert from 1.5.0 to 1.5.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1679
    • build(deps): bump okhttp-bom from 4.9.2 to 4.10.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1678
    • build(deps): bump google-http-client from 1.40.1 to 1.42.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1680
    • build(deps): bump maven-jar-plugin from 3.1.0 to 3.2.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1681
    • build(deps): bump auto-service from 1.0-rc5 to 1.0.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1673
    • build(deps-dev): bump spring-context from 5.2.14.RELEASE to 5.3.21 by @dependabot in https://github.com/OpenFeign/feign/pull/1671
    • build(deps): bump sortpom-maven-plugin from 2.8.0 to 3.1.3 by @dependabot in https://github.com/OpenFeign/feign/pull/1682
    • build(deps): bump spring-web from 4.3.6.RELEASE to 4.3.30.RELEASE by @dependabot in https://github.com/OpenFeign/feign/pull/1686
    • build(deps): bump netty.version from 4.1.78.Final to 4.1.79.Final by @dependabot in https://github.com/OpenFeign/feign/pull/1684
    • build(deps): bump micrometer-core from 1.9.1 to 1.9.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1685
    • build(deps): bump reactor.version from 3.4.19 to 3.4.21 by @dependabot in https://github.com/OpenFeign/feign/pull/1688
    • build(deps): bump google-http-client from 1.42.1 to 1.42.2 by @dependabot in https://github.com/OpenFeign/feign/pull/1690
    • build(deps): bump maven-bundle-plugin from 5.1.6 to 5.1.7 by @dependabot in https://github.com/OpenFeign/feign/pull/1691
    • build(deps-dev): bump spring-context from 5.3.21 to 5.3.22 by @dependabot in https://github.com/OpenFeign/feign/pull/1692
    • build(deps): bump maven-install-plugin from 2.5.2 to 3.0.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1699
    • build(deps): bump maven-deploy-plugin from 2.8.2 to 3.0.0 by @dependabot in https://github.com/OpenFeign/feign/pull/1698
    • chore(deps): upgrades JAXB dependencies for feign-jaxb on Java17 by @smlgbl in https://github.com/OpenFeign/feign/pull/1700

    New Contributors

    • @Hrozhek made their first contribution in https://github.com/OpenFeign/feign/pull/1649

    Full Changelog: https://github.com/OpenFeign/feign/compare/11.9...11.9.1

    Source code(tar.gz)
    Source code(zip)
  • 11.9(Jun 23, 2022)

    What's Changed

    • Fixed dangling javadoc comment warning by applying new mapping by @Hakky54 in https://github.com/OpenFeign/feign/pull/1568
    • Remove deprecated method. by @myifeng in https://github.com/OpenFeign/feign/pull/1545
    • fix: field of enum must be final by @jizhuozhi in https://github.com/OpenFeign/feign/pull/1577
    • 1497 : spring contract annotation alias handled by @pavansharma36 in https://github.com/OpenFeign/feign/pull/1579
    • Use charset of request to create the String content. by @akuhtz in https://github.com/OpenFeign/feign/pull/1571
    • Add support for the parameter type corresponding to headerMapIndex for user object by @mroccyen in https://github.com/OpenFeign/feign/pull/1581
    • SpringContract supports @RequestPart and @RequestHeader annotation parameters by @mroccyen in https://github.com/OpenFeign/feign/pull/1583
    • Add ability use case insensitive headers for default Client by @selectee in https://github.com/OpenFeign/feign/pull/1586
    • Fixed undefined value in @QueryMap params works not as described by @mroccyen in https://github.com/OpenFeign/feign/pull/1585
    • All decoders follow rule: if a status is 404 it returns empty or null value by @radio-rogal in https://github.com/OpenFeign/feign/pull/1597
    • Deprecate QueryMap.encode, remove processing of the "encode" parameter by @radio-rogal in https://github.com/OpenFeign/feign/pull/1551
    • [GH-1319] Add Support for Path Style Parameter Expansion by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1537
    • Stream decoder optimize by @mroccyen in https://github.com/OpenFeign/feign/pull/1590
    • fix issue 1420 by @mroccyen in https://github.com/OpenFeign/feign/pull/1620
    • Add async behavior to OkHttpClient by @joelmarty in https://github.com/OpenFeign/feign/pull/1629
    • Advanced parametrized type resolution for AsyncFeign by @edudar in https://github.com/OpenFeign/feign/pull/1623
    • Fix for #1286 by @velo in https://github.com/OpenFeign/feign/pull/1287
    • Support of capabilities for AsyncFeign by @edudar in https://github.com/OpenFeign/feign/pull/1626
    • Alternative ResponseInterceptor attempt by @velo in https://github.com/OpenFeign/feign/pull/1634

    Dependencies updated:

    • [Snyk] Upgrade org.bouncycastle:bcprov-jdk15on from 1.69 to 1.70 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1556
    • [Snyk] Security upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.0 to 2.13.1 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1558
    • [Snyk] Upgrade org.openjdk.jmh:jmh-core from 1.33 to 1.34 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1567
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.70.Final to 4.1.72.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1564
    • [Snyk] Upgrade org.slf4j:slf4j-api from 1.7.32 to 1.7.33 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1573
    • [Snyk] Upgrade org.slf4j:slf4j-nop from 1.7.33 to 1.7.35 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1574
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.72.Final to 4.1.73.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1572
    • [Snyk] Upgrade org.slf4j:slf4j-api from 1.7.35 to 1.7.36 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1582
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.73.Final to 4.1.74.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1584
    • [Snyk] Upgrade com.google.code.gson:gson from 2.8.9 to 2.9.0 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1589
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.3.0.RELEASE to 3.4.14 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1587
    • [Snyk] Upgrade io.reactivex.rxjava2:rxjava from 2.2.14 to 2.2.21 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1588
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.14 to 3.4.15 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1596
    • [Snyk] Upgrade org.openjdk.jmh:jmh-generator-annprocess from 1.34 to 1.35 by @velo in https://github.com/OpenFeign/feign/pull/1607
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.15 to 3.4.16 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1605
    • [Snyk] Upgrade io.netty:netty-handler from 4.1.74.Final to 4.1.75.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1604
    • [Snyk] Upgrade io.netty:netty-handler from 4.1.75.Final to 4.1.76.Final by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1616
    • [Snyk] Fix for 1 vulnerabilities by @velo in https://github.com/OpenFeign/feign/pull/1618
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.16 to 3.4.17 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1615
    • [Snyk] Upgrade io.projectreactor:reactor-core from 3.4.17 to 3.4.18 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1625
    • [Snyk] Upgrade org.reactivestreams:reactive-streams from 1.0.3 to 1.0.4 by @kdavisk6 in https://github.com/OpenFeign/feign/pull/1632
    • build(deps-dev): bump jackson-databind from 2.13.1 to 2.13.2.1 by @dependabot in https://github.com/OpenFeign/feign/pull/1614
    • [Snyk] Upgrade com.fasterxml.jackson.core:jackson-databind from 2.13.2 to 2.13.3 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1633

    New Contributors

    • @Hakky54 made their first contribution in https://github.com/OpenFeign/feign/pull/1568
    • @myifeng made their first contribution in https://github.com/OpenFeign/feign/pull/1545
    • @jizhuozhi made their first contribution in https://github.com/OpenFeign/feign/pull/1577
    • @pavansharma36 made their first contribution in https://github.com/OpenFeign/feign/pull/1579
    • @mroccyen made their first contribution in https://github.com/OpenFeign/feign/pull/1581
    • @selectee made their first contribution in https://github.com/OpenFeign/feign/pull/1586
    • @joelmarty made their first contribution in https://github.com/OpenFeign/feign/pull/1629
    • @edudar made their first contribution in https://github.com/OpenFeign/feign/pull/1623

    Full Changelog: https://github.com/OpenFeign/feign/compare/11.8...11.9

    Source code(tar.gz)
    Source code(zip)
  • 11.8(Dec 23, 2021)

    What's Changed

    • Provide a way to exclude headers from logs by @radio-rogal in https://github.com/OpenFeign/feign/pull/1530
    • [java11] Add default timeout value as Request.Options uses by @radio-rogal in https://github.com/OpenFeign/feign/pull/1532
    • [Snyk] Upgrade io.netty:netty-codec-http from 4.1.68.Final to 4.1.69.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1534
    • [Snyk] Security upgrade com.google.code.gson:gson from 2.8.8 to 2.8.9 by @snyk-bot in https://github.com/OpenFeign/feign/pull/1535
    • Fixed flaky tests in feign.json.JsonEncoderTest by @Augustine-C in https://github.com/OpenFeign/feign/pull/1538
    • asyncBuilder can override default logger by @radio-rogal in https://github.com/OpenFeign/feign/pull/1539
    • docs: Change Java11 New HTTP/2 Client link to JEP 321 by @KENNYSOFT in https://github.com/OpenFeign/feign/pull/1540
    • HTTP protocol version on the logging by @radio-rogal in https://github.com/OpenFeign/feign/pull/1543
    • [Snyk] Upgrade io.netty:netty-handler from 4.1.69.Final to 4.1.70.Final by @snyk-bot in https://github.com/OpenFeign/feign/pull/1549
    • The counter indicator increases by 2 each time (on happy path) by @radio-rogal in https://github.com/OpenFeign/feign/pull/1548
    • Reason is optional in HTTP2 by @radio-rogal in https://github.com/OpenFeign/feign/pull/1550
    • MeteredDecoder records timer once in happy path by @radio-rogal in https://github.com/OpenFeign/feign/pull/1554

    New Contributors

    • @KENNYSOFT made their first contribution in https://github.com/OpenFeign/feign/pull/1540

    Full Changelog: https://github.com/OpenFeign/feign/compare/11.7...11.8

    Source code(tar.gz)
    Source code(zip)
  • 11.7(Oct 26, 2021)

    What's new in OpenFeign 11.7

    This minor release includes: 🎁

    Highlights: ⚡️

    • Get build compatible with jdk 16 (#1519)
    • [mock] verifyTimes with RequestKey parameter (#1517)
    • JDK 11 HttpClient async implement for AsyncFeign. (#1330)

    Enhancements 🎉

    • Changing archuis-core scope to test (#1496)
    • Aggregate Micrometer "uri" label values under uri template (#1493)
    • SOAPEncoder: Add support to modify soap message manually (#1503)
    • set request factory in Google http client constructor (#1509)
    • Fixed flaky tests due to class.getMethods (#1525)

    Security Updates 🔐

    • Many libraries upgrade to latest version (help wanted to list which ones)
    • Okhttp: CVE-2020-29582 due to old version of Okhttp (Squareup) (#1514)

    Contributors

    @velo @kdavisk6 @mikrethor @martinacat @Laess3r @moritzluedtke @radio-rogal @doumdoum @UzimakiNaruto @Augustine-C

    Source code(tar.gz)
    Source code(zip)
  • 11.6(Jul 26, 2021)

    What's new in OpenFeign 11.6

    This minor release includes: 🎁

    Bug Fixes 🐞

    • Fix exception thrown when using a custom error decoder with metrics (#1466 #1468)

    Contributors

    @kdavisk6 @velo @DarkAtra

    Source code(tar.gz)
    Source code(zip)
  • 11.5(Jul 21, 2021)

    What's new in OpenFeign 11.5

    This minor release includes: 🎁

    Highlights: ⚡️

    • Modifying Contract to support passing all parameters to encoders #1448 (
    • Micrometer metrics tags extension (#1322)

    Contributors

    @velo @kdavisk6 @fabiocarvalho777 @Kuvaldis

    Source code(tar.gz)
    Source code(zip)
  • 11.4(Jul 19, 2021)

  • 11.3(Jul 19, 2021)

    What's new in OpenFeign 11.3

    This minor release includes: 🎁

    Highlights: ⚡️

    • Change MindMap to PlantUML (#1396)
    • Rework the Jackson module as a Jackson Jr alternative (#1409)
    • Add JSON-java decoder and encoder (#1387)
    • Import annotation error decoder (#1454)

    Enhancements 🎉

    • Allow multiple inheritance on the interface level with current restri…
    • Add response headers to FeignException (#1452)
    • Adding support for meta-annotations (#1458)

    Bug Fixes 🐞

    • Modify DefaultMethodHandler to work with Android (#1436)
    • Run java11 build, if JDK version is at least 11 (#1418)
    • Fix no response logging on async Feign (#1450)

    Security Updates 🔐

    • Many libraries upgrade to latest version (help wanted to list which ones)

    Contributors

    @kdavisk6 @velo @silkentrance @BigMichi1 @radio-rogal @AWinterman @ashleyfrieze

    Source code(tar.gz)
    Source code(zip)
  • 11.2(Jul 19, 2021)

    What's new in OpenFeign 11.2

    This minor release includes: 🎁

    Enhancements 🎉

    • Use charset from response Content-Type header to decode (#1302)
    • Collect http_response_code for successfull and failed requests (#1375)
    • Ignore @BeanParam (#1294)

    Bug Fixes 🐞

    • Make the FieldQueryMapEncoder encoder thread safe (#1369)
    • GH-1270: Fix conflict between single and multi-value headers (#1347)

    Security Updates 🔐

    • Upgrade libraries

    Contributors

    @kdavisk6 @velo @Budlee @jaimepineiro

    Source code(tar.gz)
    Source code(zip)
  • 11.1(Mar 23, 2021)

    What's new in OpenFeign 11.1

    This minor release includes: 🎁

    Highlights: ⚡️

    • Update Default Client to handle Compression correctly (#934, #1208, #1349)

    Enhancements 🎉

    • Improvements to build quality/stability (#1346, #1343, #1364, #1360)
    • Use charset from response Content-Type header to decode (#1302)
    • Collect http_response_code for successfull and failed requests (#1375)

    Bug Fixes 🐞

    • Fix conflict between single and multi-value headers (#1347)
    • Ignore @BeanParam (#1294)
    • Fix bug for FeignException cannot get the correct charset (#1325) (#1345)

    Security Updates 🔐

    • Upgrade httpclient5 to GA version 5.0.3 (#1373)

    Contributors

    @kdavisk6 @velo @thanhj
    @ashleyfrieze @Linda-pan @jdpc86 @jaimepineiro @youngxinler

    Source code(tar.gz)
    Source code(zip)
  • 10.12(Dec 28, 2020)

    What's new in OpenFeign 10.12

    This minor release includes: 🎁

    Highlights: ⚡️

    • OpenFeign is now using CircleCi for builds and releases

    Enhancements 🎉

    • Support metric names customization (#1311)
    • Allows @param value in default contract to be taken from param names (#1309)
    • Track number of exception that happen while decoding payload (#1288)
    • Serializable feign.Request #1193 (#1262)
    • Add support for Request Timeouts to HTTP/2 Java 11 Client. (#1233)

    Bug Fixes 🐞

    • Fixes typo in JDoc (#1279)
    • Fixes propagation of unchecked exceptions in feign-micrometer (#1282)
    • Java11client connect timeout (#1307)

    Security Updates 🔐

    • Upgrade Jackson to 2.10.5.1 (#1323)
    • Upgrade JUnit to 4.13.1 (#1335)
    • Upgrade Apache Commons Http to 4.5.136 (#1283)
    • Upgrade Bouncy Castle to 1.61 (#1303)

    Contributors

    @meare @krzyk @Kuvaldis @gb-klein @Nikolas-Charalambidis @velo @ChunMengLu @tommyk-gears

    Source code(tar.gz)
    Source code(zip)
  • 10.10.1(Apr 26, 2020)

    What's new in OpenFeign 10.10.1

    This bug release includes:

    Highlights: ⚡️

    • OpenFeign is now being built and tested on jdk14 (#1196)

    Bug Fixes 🐞

    • Store expanded Header Template values as Literals (#1203)
    • Ensure that Java 11 modules are included in the release (#1213)
    • Fix expansion of @RequestParam empty lists (#1200)

    Contributors

    @darrenfoong

    Source code(tar.gz)
    Source code(zip)
  • 10.9(Apr 22, 2020)

    What's new in OpenFeign 10.9

    This minor release includes

    Highlights: ⚡️

    • Support for Micrometer and Dropwizard Metrics (#1181, #1185, #1188)

    Enhancements 🎉

    • Configurable to disable streaming mode for Default client (#1182)
    • Allow Overrides for Parameter Name when expanding Beans or POJO (#1184)

    Bug Fixes 🐞

    • Add extra information when failing to parse contract (#1176)
    Source code(tar.gz)
    Source code(zip)
  • 10.7.4(Jan 21, 2020)

    What's new in OpenFeign 10.7.4

    This patch-release includes fixes for backward compatibility issues:

    Bug Fixes 🐞

    • Restore Request.Body accessibility for compatibility (#1164)
    Source code(tar.gz)
    Source code(zip)
  • 10.7.3(Jan 19, 2020)

    What's new in OpenFeign 10.7.3

    ❗️ This release contains unintentional backward-incompatible breaking changes, please use 10.7.4 ❗️

    This patch-release includes:

    Bug Fixes 🐞

    • Correct Encoding and restore decodeSlash in QueryTemplate (#1160)

    Additional Changes

    • Update SOAP Encoder Documentation for useFirstChild (#1161)
    • Update okhttp client version from 3.6.0 to 3.14.4. (#1158)

    Contributors

    @svenhaag

    Source code(tar.gz)
    Source code(zip)
  • 10.7.2(Jan 12, 2020)

    What's new in OpenFeign 10.7.2

    This patch-release includes:

    Highlights: ⚡️

    • Remove Template Expression naming restrictions (#1139)
    • Ensure Iterable values are encoded before template expansion (#1138)

    Bug Fixes 🐞

    • Include variables Query Parameter Names when listing template parameters (#1144)
    • Ensure all brackets are decoded in JSON based Body Templates (#1140)
    • Force followRedirects on the OkHttpClient when needed (#1130)
    • Fix formParams contract parsing (#1137)

    Documentation Updates

    • Update year in license headers (#1155)
    • Clarify availability of a Response Body in FeignException (#1149)
    • Clarify when to use a custom Target or Request Interceptor documentation (#1148)
    • Update documentation regarding decodeSlash documentation (#1147)
    • Adds logging level to documentation. (#1134

    Contributors

    @fpavageau @dnsbtchr @switchYello

    Source code(tar.gz)
    Source code(zip)
  • 10.7.0(Nov 24, 2019)

    What's new in OpenFeign 10.7.0

    Highlights: ⚡️

    • Fix for vunerabilities reported by snky (#1121
    • Bump reactive dependencies. (#1105)

    Enhancements 🎉

    • Makes iterator compatible with Java iterator expected behavior (#1117)
    • Deprecated encoded and add comment (#1108)

    Contributors

    @ItamarBenjamin @SimY4

    Source code(tar.gz)
    Source code(zip)
  • 10.5.0(Oct 1, 2019)

    What's new in OpenFeign 10.5.0

    Highlights: ⚡️

    • Support for Apache HTTP Client 5 (#1065)
    • Declarative contracts (#1060)

    Enhancements 🎉

    • Bump Apached HTTP client to 4.5.10. (#1080)

    Contributors

    @mxmlnglt

    Source code(tar.gz)
    Source code(zip)
  • 10.4.0(Aug 30, 2019)

    What's new in OpenFeign 10.4.0

    Highlights: ⚡️

    • Support for Google HTTP Client (#1057)
    • Feign 11 Roadmap (#1054)

    Bug Fixes 🐞

    • Corrected issues when using JavaLogger and multiple loggers (#1047)

    Enhancements 🎉

    • Adds Request to FeignException. (#1039)
    • Support JDK Proxy in the Default client (#1045)

    Additional Changes

    • Documentation Fixes (#1055, #1056)

    Contributors

    @finnetrolle, @herrhilmi, and @blakesmith

    Source code(tar.gz)
    Source code(zip)
  • 10.3.0(Aug 12, 2019)

    What's new in OpenFeign 10.3.0

    Highlights:

    • Releases now go to Maven Central (OSSRH) (#968)

    Bug Fixes

    • Maintain user-given order for header values (#1009)
    • Response.InputStreamBody missing toString implementation (#1022)
    • Avoided url appending with slash when matrix parameter exists (#999)
    • Parse Retry-After header responses that include decimal points (#980)
    • Don't add slash to URI if it is a matrix parameter like (#998)
    • Add test scope to java-hamcrest dependency (#964)

    Enhancements

    • Adds support for per request timeout options. (#970)
    • JacksonEncoder avoids intermediate String request body (#989)
    • Reactive Wrappers: Do Not wrap exceptions in RuntimeExceptions (#1004)

    Additional Changes

    • Dependency Updates (#975, #976, #997, #1010, #1024, #1025, #1031)
    • Documentation Fixes (#986, #1030)
    Source code(tar.gz)
    Source code(zip)
  • 10.2.3(May 11, 2019)

    What's new in OpenFeign 10.2.3

    Highlights

    • Bugfix: Corrected regression issues related to URI template changes (#909, #910, #930, #931, #937, #939)

    Additional Changes

    • Replace deprecated body #959
    • Fixes NullPointerException when accessing a FeignException's content #914
    • Updated README #921
    • Initial CI Build Refactor #962
    • Add test scope to java-hamcrest dependency #964
    • Header Template Unit Tests #958
    Source code(tar.gz)
    Source code(zip)
  • 10.2.0(Feb 13, 2019)

    What's new in OpenFeign 10.2.0

    Highlights

    • Security: Updated vulnerable dependencies to their latest versions
    • Bugfix: Corrected URI encoding issues
    • Enhancements: Support for CompleteableFuture, Optional as a 404 code, SOAP services.

    Additional Changes

    • No Longer prepend uri with slash if it is a query string (#889)
    • Refactored Header and Query parameter JAXRS Contract Parsing (#896)
    • Allow 1xx status codes (#871)
    • Updating Hystrix Versions (#886)
    • Make status mandatory (#880)
    • Adding URI segment specific encoding (#882)
    • Fix ContentService example (#888)
    • Update benchmarks (#885)
    • Managing Jackson a the parent (#884)
    • fix: benchmark/pom.xml to reduce vulnerabilities (#883)
    • Adjusts copyright headers for this year (#877)
    • Update README.md (#869)
    • fix: pom.xml to reduce vulnerabilities (#867)
    • Fix typo in check null message => HttpClient.java (#864)
    • fix: httpclient/pom.xml to reduce vulnerabilities (#861)
    • fix: pom.xml to reduce vulnerabilities (#859)
    • Fixes NPE when a Response does not provide headers (#855) …
    • Add support for java 8's Optional type to represent a HTTP 404 respon… …
    • Fix type in README (#849)
    • Generating Bill of Material (#846)
    • Add unit tests for class feign.Util (#844)
    • Add support for CompletableFuture for method return types (#638)
    • Adding Support for Query Parameter Name Expansion (#841)
    • Set versions on all poms to 10.2-SNAPSHOT (#843)
    • Adding SOAP CoDec (+ JAXB modifications) (#786)
    • Filter out sythetic fields from FieldQueryMapEncoder (#840)
    • Add fine-grained HTTP error exceptions (#825)
    Source code(tar.gz)
    Source code(zip)
  • 10.0.1(Aug 16, 2018)

    What's new in OpenFeign 10.0.1

    🎉 OpenFeign is now baselined on Java 8 (JDK 8) 🎉

    Additional Changes

    • #765 [JAX-RS] Added Support Multiple values when using @Consumes and @Produces
    • #766 [Core] Added the ability to define a Charset when creating a Response Reader
    • #758 [JAXB] Support Parameterized Types
    • #744 [Core] Added HttpMethod to RetryableException
    • #724 [Core] Remove unresolved Header parameters
    • #706 [Mock] Adding RequestHeaders to help manage headers.
    Source code(tar.gz)
    Source code(zip)
  • 10.0.0(Aug 16, 2018)

    What's new in OpenFeign 10.0.0

    🎉 OpenFeign is now baselined on Java 8 (JDK 8) 🎉

    Additional Changes

    • #765 [JAX-RS] Added Support Multiple values when using @Consumes and @Produces
    • #766 [Core] Added the ability to define a Charset when creating a Response Reader
    • #758 [JAXB] Support Parameterized Types
    • #744 [Core] Added HttpMethod to RetryableException
    • #724 [Core] Remove unresolved Header parameters
    • #706 [Mock] Adding RequestHeaders to help manage headers.
    Source code(tar.gz)
    Source code(zip)
Owner
null
A high-level and lightweight HTTP client framework for Java. it makes sending HTTP requests in Java easier.

A high-level and lightweight HTTP client framework for Java. it makes sending HTTP requests in Java easier.

dromara 1.2k Jan 8, 2023
http-kit is a minimalist, event-driven, high-performance Clojure HTTP server/client library with WebSocket and asynchronous support

HTTP Kit A simple, high-performance event-driven HTTP client+server for Clojure CHANGELOG | API | current Break Version: [http-kit "2.5.3"] ; Publish

HTTP Client/Server for Clojure 2.3k Dec 31, 2022
Base classes and utilities for Java Carbyne Stack service clients

Carbyne Stack Java HTTP Client This project provides common functionality for the Java-based HTTP clients for the Carbyne Stack microservices. License

Carbyne Stack 5 Oct 15, 2022
A base for all of my anarchy clients.

client-base A base for all of my anarchy clients Info This base comes with: A module manager with modules of all kinds to get you started A command ma

Gavin 7 Nov 6, 2021
Asynchronous Http and WebSocket Client library for Java

Async Http Client Follow @AsyncHttpClient on Twitter. The AsyncHttpClient (AHC) library allows Java applications to easily execute HTTP requests and a

AsyncHttpClient 6k Jan 8, 2023
Google HTTP Client Library for Java

Google HTTP Client Library for Java Description Written by Google, the Google HTTP Client Library for Java is a flexible, efficient, and powerful Java

Google APIs 1.3k Jan 4, 2023
⚗️ Lightweight HTTP extensions for Java 11

Methanol A lightweight library that complements java.net.http for a better HTTP experience. Overview Methanol provides useful lightweight HTTP extensi

Moataz Abdelnasser 175 Dec 17, 2022
Unirest in Java: Simplified, lightweight HTTP client library.

Unirest for Java Install With Maven: <!-- Pull in as a traditional dependency --> <dependency> <groupId>com.konghq</groupId> <artifactId>unire

Kong 2.4k Jan 5, 2023
Java HTTP Request Library

Http Request A simple convenience library for using a HttpURLConnection to make requests and access the response. This library is available under the

Kevin Sawicki 3.3k Dec 30, 2022
Tiny, easily embeddable HTTP server in Java.

NanoHTTPD – a tiny web server in Java NanoHTTPD is a light-weight HTTP server designed for embedding in other applications, released under a Modified

NanoHttpd 6.5k Jan 5, 2023
A Java event based WebSocket and HTTP server

Webbit - A Java event based WebSocket and HTTP server Getting it Prebuilt JARs are available from the central Maven repository or the Sonatype Maven r

null 808 Jan 3, 2023
Unirest in Java: Simplified, lightweight HTTP client library.

Unirest for Java Install With Maven: <!-- Pull in as a traditional dependency --> <dependency> <groupId>com.konghq</groupId> <artifactId>unire

Kong 2.4k Jan 5, 2023
Square’s meticulous HTTP client for the JVM, Android, and GraalVM.

OkHttp See the project website for documentation and APIs. HTTP is the way modern applications network. It’s how we exchange data & media. Doing HTTP

Square 43.4k Jan 5, 2023
Share the chat messages across Minecraft Servers via HTTP backend powered by Spring Boot, this is the backend part of the project.

InterconnectedChat-Backend Share the chat messages across Minecraft Servers via HTTP backend powered by Spring Boot, this is the backend part of the p

贺兰星辰 3 Oct 6, 2021
Fast_Responder is a service that lets you quickly create an Http request responder

Fast_Responder is a service that lets you quickly create an Http request responder. The transponder can receive any request path configured and determine the request parameters according to your configuration to return different results. In addition to processing requests, the transponder can also make Http requests to any request address based on the latency, request headers, and parameters you configure. In essence, fast_responder is a dynamic mock service.

null 8 Jan 26, 2022
httpx - CLI to run HTTP file

httpx: CLI for run http file httpx is a CLI to execute requests from JetBrains Http File. How to install? Mac : brew install httpx-sh/tap/httpx Other

httpx 105 Dec 15, 2022
ssh, scp and sftp for java

sshj - SSHv2 library for Java To get started, have a look at one of the examples. Hopefully you will find the API pleasant to work with :) Getting SSH

Jeroen van Erp 2.2k Jan 4, 2023
AltiriaSmsJavaClient, the official Java client of Altiria

¡Atención! Este proyecto aún se encuentra en desarrollo. Pronto se publicará la versión final para su uso. Altiria, cliente SMS Java Altiria SMS Java

Altiria 4 Dec 5, 2022
GithubReleases4J - GitHub Releases for Java , based on GitHub RESTful API .

GithubReleases4J - GitHub Releases for Java , based on GitHub RESTful API .

Carm 5 Jun 27, 2022