S.
03/29/2022, 6:48 PMdelete("{id}") {
val id = call.parameters["id"]?.toInt() ?: call.respondText(
"Missing or malformed id",
status = HttpStatusCode.BadRequest
)
...
}
vs
delete("{id}") {
val id = call.parameters["id"]?.toInt() ?: return@delete call.respondText(
"Missing or malformed id",
status = HttpStatusCode.BadRequest
)
...
}
id
Aleksei Tirman [JB]
03/29/2022, 9:25 PMcall.respond()
call executes the ApplicationSendPipeline
that has the Engine
phase where actual sending of a response happens.S.
03/29/2022, 9:27 PMcall.respond()
within e.g. delete{ }
keep going?Aleksei Tirman [JB]
03/29/2022, 9:35 PMS.
03/29/2022, 9:36 PM