3 ms·
Show HN: Parameter Validation in Javalin (Kotlin)
- tipsee 8y agoIt's been a while since I've posted about Javalin here, but I'm really happy with how the new validation setup ended up: val myQpInt = ctx.validatedQueryParam("my-qp").asInt().getOrThrow() // past, java + kotlin val myQpInt = ctx.queryParam<Int>("my-qp").get() // kotlin now var myQpInt = ctx.queryParam("my-qp", Integer.class).get(); // java now