HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
437 stars 77 forks source link

Allow access to cookies #137

Open blitzcode opened 8 years ago

blitzcode commented 8 years ago

Right now the only way to use cookies and to distinguish different clients is to create/read them in JavaScript and get them to the server with an FFI call. See https://github.com/blitzcode/hue-dashboard/blob/ab62b89e1de251db15e220daec536a89c12efaf5/static/dashboard.html#L45. That works fine in principle, but adds another client / server round trip every time. It would be nice to just set / read them from the HTTP headers like in a normal web server.

HeinrichApfelmus commented 6 years ago

I have just implemented this as well, because it is very similar to something else that I want to implement (a function that retrieves the request URI). Does the latest commit work for you?

blitzcode commented 6 years ago

Neat, I'll have some time in the next week or two to dig into this. Looking forward to delete some JS code from my project ;-)