While @HttpExchange was initially created for client use, the idea was always that an @HttpExchange interface is an HTTP service contract, neutral to client or server.

In addition to simplifying client code, there are also cases where a shared interface between client and server provides an easy way for clients to access server APIs and keep up with changes. This leads to increased coupling that won't be a good fit for a public API but may be exactly the goal for internal APIs. This is commonly used with Spring Cloud and OpenFeign as described in https://github.com/spring-projects/spring-framework/issues/30733#issuecomment-1613576238.

Similar support is also planned for the RSocket interface client in #29240.

Comment From: OlgaMaciaszek

I'd like to work on that.

Comment From: rstoyanchev

  • Superseded by #30980