Skip to content

Commit f9c9b8a

Browse files
committed
Handle GET and POST on test endpoint
1 parent 10f6aae commit f9c9b8a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/java/com/regexplanet/TestController.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
import java.util.regex.Pattern;
1414

1515
import org.springframework.stereotype.Controller;
16-
import org.springframework.web.bind.annotation.GetMapping;
16+
import org.springframework.web.bind.annotation.RequestMapping;
17+
import org.springframework.web.bind.annotation.RequestMethod;
1718
import org.springframework.web.bind.annotation.RequestParam;
1819
import org.springframework.web.util.HtmlUtils;
1920

@@ -44,7 +45,7 @@ boolean stringToBoolean(String s)
4445
}
4546

4647

47-
@GetMapping("/test.json")
48+
@RequestMapping(value = "/test.json", method = {RequestMethod.GET, RequestMethod.POST})
4849
public void handle(jakarta.servlet.http.HttpServletResponse resp,
4950
@RequestParam(required = false) String regex,
5051
@RequestParam(required = false) String replacement,

0 commit comments

Comments
 (0)