Colton Idle
07/09/2021, 4:03 PMwhen (request.path) {
"/api/one/two" ->
return "blah"
"/api/three/four?arg=myArg" ->
return "boop"
I want the second case to basically catch all api/three/four*
instead of hard coding the arg. Or maybe there's another way I should go about this. e.g. Only get the path without the args, and then if I need the args I can drill down and get them from the request if need be? Thoughts?mbonnin
07/10/2021, 8:55 AMwhen {
requestPath == "/api/one/two" -> "blah"
Regex("/api/three/four.*").matchEntire(requestPath) -> "boop"
}
mbonnin
07/10/2021, 9:03 AMtoHttpUrl()
jw
07/12/2021, 11:48 AMColton Idle
07/12/2021, 12:07 PMColton Idle
07/13/2021, 4:46 AMval asdf = URI.create(request.path!!)
when (asdf.path) {
...
Colton Idle
07/13/2021, 4:52 AM