1

from what I understand about Web Client is it's non blocking meaning the client does not need to wait till the response arrives and can do other tasks parallelly But then using block() in Web Client supports requests synchronously is there any slightest performance advantage when using Web client with block vs using Rest Template or both are same Basically if I have to use Web Client with block, then its better to still stick with Rest Template?

İsmail Y.
  • 3,579
  • 5
  • 21
  • 29
ramkr
  • 41
  • 4

1 Answers1

1

RestTemplate is in maintenance mode and Spring advises us to use WebClient instead, see Javadocs.

However, using block(), WebClient offers the same synchronous way of working as RestTemplate does.

lkatiforis
  • 5,703
  • 2
  • 16
  • 35