Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using RestTemplate to call a WebFlux microservice

Is it possible to call a Spring WebFlux API from a Spring MVC App using RestTemplate?

I get a 200 response however the body is null, this isn't an object mapping issue because I am just trying to return a string at this point. If I make the same request against the WebFlux API in a browser or Postman the body is as expected.

Is there a way to get RestTemplate to work? I don't want to have to update all of my apps to WebFlux right now.

like image 394
dan Avatar asked Dec 05 '25 21:12

dan


1 Answers

Since it is using HTTP protocol, you can definitely use RestTemplate or even any other HttpClient from whatever language you want to communicate with WebFlux REST API.

If request is working from postman then you can try debugging your code around RestTemplate to see what is going on.

like image 175
FilipRistic Avatar answered Dec 07 '25 17:12

FilipRistic



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!