I have some controller and I need to send request to another domain and get response result body (it is every time html). How can I do it? Is HttpURLConnection only solution?
@RequestMapping("/")
public ModelAndView mainPage(){
ModelAndView view = new ModelAndView("main");
String conten = /*Here is request result to another domain(result is just html, not JSON)*/
view.addAttribute("statistic","conten);
return view;
}