It will be helpful if the method names are made consistent:
Odd man:
org.springframework.web.reactive.function.client.support.WebClientAdapter.forClient
vs.
org.springframework.web.client.support.RestClientAdapter.create
org.springframework.web.client.support.RestTemplateAdapter.create
Granted it is a minor issue and these are APIs from -web and -webflux.
Suggestion:
org.springframework.web.reactive.function.client.support.WebClientAdapter.create
that delegates to org.springframework.web.reactive.function.client.support.WebClientAdapter.forClient
Comment From: rstoyanchev
@sandipchitale, thank you for spotting that inconsistency!
Comment From: sankarav
Looks like the documentation here still refers to the deprecated method https://docs.spring.io/spring-framework/reference/integration/rest-clients.html#rest-http-interface
Will love to contribute but I have never did contribution, will love to, dont know where to start
Comment From: sbrannen
@sankarav, well spotted!
It appears that we're still using forClient()
in two places in that chapter.
https://github.com/spring-projects/spring-framework/blob/e24954068a6ead31745e4675b294eb6eff964652/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc?plain=1#L910
And:
https://github.com/spring-projects/spring-framework/blob/e24954068a6ead31745e4675b294eb6eff964652/framework-docs/modules/ROOT/pages/integration/rest-clients.adoc?plain=1#L1093
If you'd like to update those examples yourself, you can submit a pull request (PR) to this repository to do so.
If you'd like to raise an issue and let one of the core team members make the updates, please create a new issue.
Regarding how to create a PR, you should be able to find tutorials online for "how to create a PR on GitHub".
Make sure you check out our "Contributing to the Spring Framework" documentation as well. It points out the following:
For trivial changes, you may be able to browse, edit source files, and submit directly from GitHub.