jackmiras
02/20/2017, 4:10 PMkirillrakhman
02/20/2017, 4:10 PMjackmiras
02/20/2017, 4:11 PMkirillrakhman
02/20/2017, 4:12 PMjackmiras
02/20/2017, 5:24 PMAndreas Sinz
02/20/2017, 5:37 PMjackmiras
02/20/2017, 5:38 PMclass RequestExtentions {
fun Request.bodyObject(): Any {
try {
return Parser().toKotlin(body())
} catch (e: Exception) {
return e
}
}
}
override fun post(req: Request, res: Response): Any {
val platform = req.bodyObject()
}
Andreas Sinz
02/20/2017, 5:43 PMfun post(..)
jackmiras
02/20/2017, 5:48 PMfun post(...)
but this function will repeat along other classes.class RequestExtentions {...}
Andreas Sinz
02/20/2017, 5:59 PMjackmiras
02/20/2017, 6:31 PM