WIP:service
[demos/testing] / src / main / java / de / juplo / demo / RemoteContentController.java
1 package de.juplo.demo;
2
3 import org.springframework.beans.factory.annotation.Autowired;
4 import org.springframework.web.bind.annotation.GetMapping;
5 import org.springframework.web.bind.annotation.RequestParam;
6 import org.springframework.web.bind.annotation.RestController;
7 import reactor.core.publisher.Mono;
8
9
10 /**
11  * Fetches data from remote-webserver and renders them as HTML.
12  * @author Kai Moritz
13  */
14 @RestController
15 public class RemoteContentController
16 {
17   @Autowired
18   RemoteContentService service;
19
20
21   @GetMapping("/")
22   public Mono<String> renderRemoteText(@RequestParam String path)
23   {
24     return service.getRemoteText(path);
25   }
26 }