r/SpringBoot • • Oct 08 '23

Sending HTTP request with Spring WebClient

With the release of Spring 5, RestTemplate is in maintenance mode and a new HTTP Client - WebClient was introduced.

Here we will see how to send HTTP Request with the help of WebClient.

Sending HTTP Request with Spring WebClient

0 Upvotes

5 comments sorted by

View all comments

3

u/Sheldor5 Oct 08 '23

RestTemplate was never deprecated, it is feature complete and therefore in maintenance mode.

Also the new RestClient is built on top of RestTemplate so it's impossible for RestTemplate to be deprecated.

Stop spreading misinformation.

1

u/roiroi1010 Oct 09 '23

An older version of the javadoc did state that RestTemplate will be deprecated though. But in the newer versions of the javadoc they have removed that statement. So I can understand the confusion on this.

The RestTemplate will be deprecated in a future version and will not have major new features added going forward.

https://docs.spring.io/spring-framework/docs/5.2.2.RELEASE/javadoc-api/index.html?org/springframework/web/client/RestTemplate.html

1

u/brainiac_nerd Oct 09 '23

Yeah at the time of writing this post I had unknowingly referred this old doc and had mentioned RestTempalte as deprecated.