Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support to Create a Proxy From an Annotated HTTP Service Interface #28386

Closed
rstoyanchev opened this issue Apr 26, 2022 · 0 comments
Closed

Support to Create a Proxy From an Annotated HTTP Service Interface #28386

rstoyanchev opened this issue Apr 26, 2022 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Apr 26, 2022

This has been raised before, see #16747 and related (duplicate) issues, but was done under Spring Cloud instead, first as an OpenFeign integration and more recently as a Retrofit integration.

The goal for this issue is first class support in the Spring Framework to create a client proxy from an annotated, HTTP service interface, since it is more generally applicable. Spring Cloud can then provide additional features around that. The same is also planned for RSocket with #24456.

Methods on such an HTTP service interface will support many of the same method arguments as for server side handling with @RequestMapping methods, but narrowing the choice down to those arguments that apply to both client and server side use. On the client side, argument values are used to populate the request, while on the server side, argument values are extracted from the request.

Methods of the HTTP service interface will require a new annotation, similar in purpose to @RequestMapping, but to declare an HTTP exchange in a way that is neutral to client or server perspective.

@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement labels Apr 26, 2022
@rstoyanchev rstoyanchev added this to the 6.0.0-M4 milestone Apr 26, 2022
@rstoyanchev rstoyanchev self-assigned this Apr 26, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
HttpRequestValues is immutable and exposes a builder.

See gh-28386
rstoyanchev added a commit that referenced this issue Apr 27, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
rstoyanchev added a commit that referenced this issue Apr 27, 2022
Boolean return value indicates if the value was resolved or not.

See gh-28386
rstoyanchev added a commit that referenced this issue May 3, 2022
Extract NamedValueArgumentResolverTests.
Move form data vs query params tests into HttpRequestValues.

See gh-28386
rstoyanchev added a commit that referenced this issue May 3, 2022
Support for RequestBody arguments.
List supported arguments on HttpExchange.
Improve null handling.

See gh-28386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant