added endpoints to test functionality properly
@@ -4,7 +4,11 @@ import java.util.HashMap;
import java.util.Map;
import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
@@ -18,4 +22,14 @@ public class WebClientController {
response.put("field", "value");
return response;
}
+
+ @PostMapping("/resource")
+ public String postResource(@RequestBody String bodyString) {
+ return "processed-" + bodyString;
+ }
+
+ @PostMapping(value = "/resource-multipart", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
+ public String handleFormUpload(@RequestPart("key1") String value1, @RequestPart("key2") String value2) {
+ return "processed-" + value1 + value2;
+ }
}
