https://kotlinlang.org logo
#ktor
Title
# ktor
l

Luis Munoz

07/23/2020, 1:14 AM
How I get the session id in a get() {}, I just see examples of doing
Copy code
call.sessions.get<MySession>()
but why isn't there call.sessions.getId or something?
b

Brad Murray

07/31/2020, 12:26 AM
The Session feature doesn't have any predefined structure. If you want a session-id, then you could yourself a Session data class which has a session-id attribute, but its more likely you'd build a Session class with the attributes your session uses, and then store in either server-side, via one of the storages, or as a secure, encypted cookie client side
10 Views