4 import org.springframework.stereotype.Controller;
5 import org.springframework.ui.Model;
6 import org.springframework.web.bind.annotation.GetMapping;
7 import org.springframework.web.bind.annotation.RequestParam;
8 import reactor.core.publisher.Mono;
12 * Fetches data from a remote-webserver and renders it as HTML.
16 public class HtmlController
18 RemoteContentService service;
21 public HtmlController(RemoteContentService service)
23 this.service = service;
28 public String fetch(Model model, @RequestParam String path)
34 .onErrorResume(t -> Mono.just(t.getMessage())));