Nope. Well the Http Header that you receive is an ascii string.
And hence on setting header or on receiving, you will manually have to convert your cookie pair (userId
) to String and and back to Long
respectively
Question
I am storing id as a string in session in play framework with scala.
Redirect("/").withSession("userId" -> id.toString)
I want to know is it possible to store it in Long type, because every time when i have to use it i am converting it again into Long again.
Solution
Nope. Well the Http Header that you receive is an ascii string.
And hence on setting header or on receiving, you will manually have to convert your cookie pair (userId
) to String and and back to Long
respectively