+package de.juplo.demo;
+
+
+<<<<<<< HEAD:src/main/java/de/juplo/demo/RemoteContentController.java
+=======
+>>>>>>> f9152f7... WIP: Implemented...:src/main/java/de/juplo/integrationtest/RemoteContentController.java
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.reactive.function.client.WebClient;
+
+
+/**
+ * Fetches data from remote-webserver and renders them as HTML.
+ * @author Kai Moritz
+ */
+public class RemoteContentController
+{
+ WebClient webClient;
+
+
+ public RemoteContentController(WebClient webClient)
+ {
+ this.webClient = webClient;
+ }
+
+
+ @GetMapping("/")
+ public String renderRemoteText(Model model, @RequestParam String path)
+ {
+ model.addAttribute(
+ "text",
+ webClient
+ .get()
+ .uri(path)
+ .retrieve()
+ .bodyToMono(String.class).block());
+
+ return "layout";
+ }
+}