Jump to content

Question about the cookies


Rav

Recommended Posts

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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...