--- /dev/null
+package de.juplo.demo;
+
+
+import org.springframework.http.MediaType;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import reactor.core.publisher.Mono;
+
+
+/**
+ * Fetches and returns data from a remote-webserver.
+ * @author Kai Moritz
+ */
+@org.springframework.web.bind.annotation.RestController
+public class RestController
+{
+ RemoteContentService service;
+
+
+ public RestController(RemoteContentService service)
+ {
+ this.service = service;
+ }
+
+
+ @GetMapping(path = "/", produces = MediaType.TEXT_PLAIN_VALUE)
+ public Mono<String> fetch(@RequestParam String path)
+ {
+ return service.getRemoteText(path);
+ }
+}