CLOVIS
07/13/2021, 10:26 AMSet-Cookie header in the response.
However, call.respond doesn't take a lambda to configure the request, unlike its client-side equivalent. I found call.respondText, which has an override with a lambda with an OutgoingContent receiver, which has a headers attribute, however it seems to be immutable.
How can I add a specific header for a specific request? I don't want that header to be present in other requests.Aleksei Tirman [JB]
07/13/2021, 10:30 AMResponseCookies object to append cookies for a response:
routing {
get("/") {
call.response.cookies.append("name1", "value")
call.response.cookies.append("name2", "value")
call.respond(HttpStatusCode.OK)
}
}CLOVIS
07/13/2021, 10:40 AMcall.request.CLOVIS
07/13/2021, 10:40 AMduuusha
07/13/2021, 11:04 AMSet response parameters section:
https://ktor.io/docs/responses.html#cookiesCLOVIS
07/13/2021, 11:15 AM