4 import org.springframework.http.MediaType;
5 import org.springframework.web.bind.annotation.GetMapping;
6 import org.springframework.web.bind.annotation.RequestParam;
7 import org.springframework.web.bind.annotation.RestController;
8 import reactor.core.publisher.Mono;
12 * Fetches and returns data from remote-webserver.
16 public class RemoteContentRestController
18 RemoteContentService service;
21 public RemoteContentRestController(RemoteContentService service)
23 this.service = service;
27 @GetMapping(path = "/", produces = MediaType.TEXT_PLAIN_VALUE)
28 public Mono<String> fetch(@RequestParam String path)
30 return service.getRemoteText(path);