I'd like to create a cookie when the client makes a specific request. If I understand correctly, that means I need to add a
Set-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.