tipsy
06/05/2017, 7:57 PMorangy
tipsy
06/05/2017, 8:02 PMtipsy
06/05/2017, 8:03 PMtipsy
06/05/2017, 8:03 PMorangy
tipsy
06/05/2017, 8:36 PMmikehearn
06/07/2017, 3:31 PMtipsy
06/09/2017, 7:23 PMapp.get("/") { req, res-> res.body("Hello World") }
or
app.get("/") { ctx -> ctx.body("Hello World") }
where ctx contains both request and responseorangy
call.respond
;)tipsy
06/09/2017, 7:27 PMorangy
tipsy
06/09/2017, 7:28 PMdalexander
06/09/2017, 7:29 PMorangy
call
) is preferred. It's easier to pass single object aroundtipsy
06/09/2017, 7:33 PMctx.body() -> get request body
ctx.body(arg) -> set response body
then let people use `ctx.response`/`ctx.request` if they want to be more explicitorangy
tipsy
06/09/2017, 7:37 PMtipsy
06/09/2017, 7:49 PMtipsy
06/09/2017, 7:49 PMContext
, i just kinda dumped everything thereorangy
orangy
tipsy
06/11/2017, 10:52 AMgregopet
06/11/2017, 1:27 PMctx.body
(and calling it sans-argument to get the req. body and with-argument to set the response body doesn't feel right, either)tipsy
06/11/2017, 2:07 PMctx.body()
returns servlet-request body (ctx.body(arg)
does not exist anymore)
- ctx.result(arg)
sets what will eventually become the response bodythisen
06/12/2017, 7:38 PMdave
06/12/2017, 9:14 PMthisen
06/12/2017, 9:35 PMthisen
06/12/2017, 9:35 PMdave
06/12/2017, 9:51 PM