Rav Posted May 10, 2016 Posted May 10, 2016 Hello,While testing cookies I found that during the UniMainModule creation setting cookie works fine: UniSession.UniApplication.Cookies.SetCookie('test_cookie','temp') but reading it raises an exception: UniSession.Cookie['test_cookie']; During the MainForm creation both code lines works fine. Is this normal behavior? Is it possible to read cookies in UniMainModule? Quote
Administrators Farshad Mohajeri Posted May 12, 2016 Administrators Posted May 12, 2016 Please do not use UniSession.Cookie. Use UniApplication.Cookies instead. Quote
Rav Posted May 14, 2016 Author Posted May 14, 2016 Thanks! I tested TUniMainModule and TMainForm on the subject of cookies: 1) In TUniMainModule: UniSession.Cookie - works, but not recommended UniSession.UniApplication.Cookies.Values - works UniApplication.Cookies.Values - doesn't work 2) In TMainForm: UniSession.Cookie - works, but not recommended UniSession.UniApplication.Cookies.Values - works UniApplication.Cookies.Values - works So the UniSession.UniApplication.Cookies.Values is a universal method for getting cookies, right? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.